Cfs:filesystem upload from ios to server result in zero bytes file

I’m running on iOS using cordova capture and cfs filesystem.
after capturing video or images i’m using the upload.
no errors but, files are zero/0 size in the end.

this is my collection and store declaration:

Videos = new FS.Collection("eventVideos", {
  stores: [new FS.Store.FileSystem("eventVideos", {path: "~/Documents/dev/chain/public/videoUploads"})]
});

this is the cordova capture code residing in a template event:

navigator.device.capture.captureImage(videoCaptureSuccess, videoCaptureError, {limit: 1});

i’ll spare you the videoCaptureError function since it doesn’t really do anything right now, but the videoCaptureSuccess looks like this:

videoCaptureSuccess = function(mediaFiles) { var i, path, len; for(i = 0, len = mediaFiles.length; i < len; i++) { path = mediaFiles[i].fullPath; Videos.insert(mediaFiles[i], function(err, fileObj) { alert(fileObj.size()); if(err) { console.log(err); } }); } };

note that the alert inside videoCaptureSuccess returns a positive number meaning there is data in there, the pictures are also saved on the device.

what’s wrong?

—update—

when i click the camera from the app this message shows in xcode console:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

sorted out !
take a look at this thread

just having a conversation with myself here :smile:
the video seem to be a whole different story…
I can;t access the data or find any kind of information about successful cases.