I’m having some trouble with the Cordova implementation of Meteor. I’m using a ImagePicker plugin (Cordova) to let a user pick his profile picture. The plugin returns the path to the file ("/storage/emulated/0/mypictures/picture.jpg").
Now I’m using the “cordova-file-server” plugin to get access to that file, due Meteor can’t access local files on Cordova.
I’m able to display the image in a “img” html element - but how can I add it to my collection with CollectionFS? I can’t generate a canvas of this image, because the cross origin policy doesn’t allow it (cordova-file-server returns a url like “192.168.22.23:8080/mypictures/picture.jpg” - it proxies the access to the local storage). My idea was to generate a base64 url, but that doesn’t work due the policy.
Also it isn’t possible to use the download method of CollectionFS, because the image urls are only available on a local device and their download method is executed on the server.
Has someone a solution for this problem?