Basic Authentication With File Transfer Plugin

so I am trying to use the file Transfer Plugin
but i have to use the Basic authentication e.g:

Username: admin;
Password: 1234;

how can i use it in this download request ?:

 fileTransfer.download(url, cordova.file.dataDirectory+"1.jpg').then((entry) => {
  alert('download complete: ' + entry.toURL());
}, (error) => {
  alert("error:"+error);
});

thanks

1 Like

Have you tried user:pass@url for the URL? Looking at the plugin source, that appears to be supported.