Upload file with username+password

Hi,

I wanted to know if there is a way to upload a file to a site, using ngcordova, that needs a username and password?

ex: FTP, OneDrive, etc

Thanks

one drive has an API for Java script check this