The following code is a 'standard' set up for meteor-uploads.
It works on desktop while in the Cordova app the uploading part works fine but the image is not shown.
Can you address me on this?
Side question : the upload part on the Android Default Browser and Android Chrome Browser does not work... is an expected behaviour? (it shows Failed: 0 error 0 Byte)
if (Meteor.isServer) {
Meteor.startup(function () {
UploadServer.init({
tmpDir: process.env.PWD + '/.uploads/tmp',
uploadDir: process.env.PWD + '/.uploads/',
checkCreateDirectories: true, //create the directories for you
getFileName: function(){
return 'xxx.jpg';
},
overwrite:true
});
});
}
if (Meteor.isClient) {
Meteor.startup(function() {
Uploader.uploadUrl = Meteor.absoluteUrl('upload'); // Cordova needs absolute URL
});
}
Please check on this forum issues related to Android. There is a bug in the browser that does not like the file control. Not sure where I've seen it but it's there.
Hi,
The following code is a 'standard' set up for meteor-uploads. It works on desktop while in the Cordova app the uploading part works fine but the image is not shown. Can you address me on this?
Side question : the upload part on the Android Default Browser and Android Chrome Browser does not work... is an expected behaviour? (it shows Failed: 0 error 0 Byte)
in template