nervgh / angular-file-upload

[ALMOST NOT MAINTAINED] Angular File Upload is a module for the AngularJS framework
MIT License
3.43k stars 1.13k forks source link

Upload file from cordova.plugin.cordova #824

Open laughinglion opened 6 years ago

laughinglion commented 6 years ago

I checked the API and issues, but I really can't find how to upload a FILE_URI received from cordova.plugin.camera. I tried passing the image received from the success callback to addToQueue but that did not do anything. At the moment I'm creating a FileItem manually and updating its progress and removal from events from Cordova FileTransfer (which also does the uploading).

What is the right way to do it with this plugin?

theoomoregbee commented 6 years ago

can't really say, but that's the essence of cordova-plugin-file-transfer it's safer

Mr-Anonymous commented 6 years ago

Did you find a solution to this? I am having the same issue. I am using cordova-plugin-camera that gets the imageUrl. The cordova-plugin-file-transfer is deprecated and it is now recommended to use XMLHttpRequest for uploading files. I was hoping I could use nervgh's angular file upload to upload this file using the imageUri gotten from cordova-plugin-camera. Has anyone had a luck on this? Can you share please?