function onCaptureSuccess(imageURI) {
var options = new FileUploadOptions();
if (currentSourceType === Camera.PictureSourceType.CAMERA) {
var end = imageURI.lastIndexOf('/') + 1;
options.fileName = imageURI.substr(end);
}
Edit (08/2013): At least in 2.9 this issue does not longer exits, no needed use substr!!
Issues in my daily developer life, somewhere between scripts and compilers...
switching between Linux and Windows...
PhoneGap 2.5 - FileTransfer options filename issue
One short missing documentation hint concerning the filename. If using Camera.PictureSourceType.SAVEDPHOTOALBUM you have, at least on Android, to distinguish for FileUploadOptions. If using CAMERA as source type with Camera.DestinationType.FILE_URI the options.filename is not needed for transferring correctly. Check following code snippet:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment