Reputation: 872
i am using cordova file transfer plugin. local machine is working fine. server not upload video file . my video file size 5MB.IOS video file upload to server is working. android not working
This is my code for upload video:
for(var i=0;i<fvideos.length;i++){
var options = new FileUploadOptions();
options.fileKey="file";
options.fileName = fvideos[i].name;
//options.fileName=fimage[i].substr(fimage.lastIndexOf('/')+1);
options.mimeType="video/mpeg";
options.chunkedMode = true;
var ft = new FileTransfer();
ft.upload(fvideos[i].fullPath, encodeURI(base_url+"/postformimage/"), function(response){
collection.push(response.data.data);
},function(){}, options);
}
Can you please Help me?
Upvotes: 0
Views: 414
Reputation: 310
Adding to what @JesseMonroy650 asked, you might also want to take a look at free memory available in your Android device during the upload. Android is notorious for creating and keeping multiple copies of your media file which quickly pushes your app beyond per-app memory usage.
Upvotes: 1