Which is really confusing, when I fix the image using the phoneβs camera, I use FileTransfer.moveTo and it sends the image to the specified folder on the SD card as desired. I also save a list of image objects in localStorage , which looks something like this:
[ Object ean: "42208556" image: "file:///storage/sdcard0/PhotoscanPhotos/d51b5b77-aab1-9947-096d-b0a92dfb87eafoto.jpg" timestamp: 1396441761000 __proto__: Object etc etc
As part of my application, I use the same [i] .image image as the src attribute to dynamically add images to the list, and it works great. However, using the same parameter for FileTransfer.upload gives me the above error.
My function is a close copy of the API documents (Cordova 3.1). The code is as follows:
function uploadImagesAsJpegs(imageObject) { var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName=imageObject.image.substr(imageObject.image.lastIndexOf('/')+1);
source share