Hi Esau,
The mechanism is similar to saving the image as a base64 string. But this will make your app very slow.
Do you want to try to work around the limitation of uploadable files larger than 2MB?
Hi Esau,
The mechanism is similar to saving the image as a base64 string. But this will make your app very slow.
Do you want to try to work around the limitation of uploadable files larger than 2MB?
Yes please, i would like to limit it to 30 seconds
could you also post how can i turn it to base64 string it migth be slower, but maybe i can get it to sync whenever there is wifi
Hi,
The problem is not in download speed, but in speed of conversion from/to base64 on device. It's not that ease to affect this.
Hi, so my app records a video, and I used the FileTransfer sample code, but it didn't work. Is it possible if you could type out what kind of code I can use to transfer the video file to a collection I created called Video. Thanks
I also used this code in my button, but I can't manage to upload it onto the server.
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles.fullPath;
alert(path);
// do something interesting with the file
}
};
// capture error callback
var captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
// start video capture
navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:1});
Hello Jennifer,
You don't load file anywhere. You have such comment:
pre// do something interesting with the file/pre
instead of loading code.
Please look at details here:
https://getsatisfaction.com/apperyio/...
Hi thanks for responding, here I have modified the code, but it still does not work. Why is that?
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
uploadVideo(mediaFiles);
}
};
// Upload file to file database server
// capture error callback
var captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
// start video capture
navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:1});
function uploadVideo(mediaFiles){
var ft = new FileTransfer(),
path = mediaFile.fullPath,
name = mediaFile.name;
Code: Select all
ft.upload(path,
"[url=https://api.appery.io/rest/1/db/files]https://api.appery.io/rest/1/db/files[/url]",
function(result) {
alert("Upload success:" + result.responseCode);
},
function(error) {
alert("Error uploading file" + errorThrown);
},
{ fileName: name });
}
Hello,
Please find our reply here: https://getsatisfaction.com/apperyio/...