[GitHub] AutoAlert commented on issue #373: Cannot take pictures on Android 8

2018-12-04 Thread GitBox
AutoAlert commented on issue #373: Cannot take pictures on Android 8
URL: 
https://github.com/apache/cordova-plugin-camera/issues/373#issuecomment-444107561
 
 
   Hi @jcesarmobile thanks for responding. 
   
   We have found the issue. The issue is with our code rather than your plugin. 
 We were using the following 
   
   function captureImage() {
   navigator.device.capture.captureImage(captureImageSuccess, 
captureImageError, {limit: 1});
   }
   
   function captureImageSuccess(mediaFiles) {
   uploadFile(mediaFiles[0]);
   }
   
   function uploadFile(mediaFile,fileType) { //#F333
   var win = function (r) {
   }
   
   var options = new FileUploadOptions();
   ImageURL=mediaFile.fullPath;
   options.fileName = (fileType)? mediaFile.name : mediaFile.file; 
//#F333
   options.mimeType = "multipart/form-data";
   var params = new Object();
   params.fileName = 'AndroidPhoneUpload';
   params.imageType = (fileType)?fileType:'Picture';   //#F333
   var printName = prompt("Add a title","");  //#F644
   if (printName){
   params.printedName = printName;
   }
   window.resolveLocalFileSystemURL(ImageURL, function(fileEntry) {
   fileEntry.file(function(fileObj) {
   params.fileSize = ""+fileObj.size;
   });
   });
   options.params = params;
   var ft = new FileTransfer();
   ft.upload(ImageURL, encodeURI("uploadURL"),win,fail,options);
   }
   
   Which we have replaced with
   
   navigator.camera.getPicture(function cameraSuccess(imageUri) {
   var options = new FileUploadOptions();
   options.fileKey="file";
   options.fileName="test";
   options.mimeType="multipart/form-data";
   var params = new Object();
   params.fileName = 'AndroidPhoneUpload';   
   options.params = params;
   var ft = new FileTransfer();
   ft.upload(imageUri, 
encodeURI("https://upload.okappy.com/UploadToS3;), win, fail, options);
   }, function captureImageError(error) {
   console.debug("Unable to obtain picture: " + error, "app");
   }, options);


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org



[GitHub] AutoAlert commented on issue #373: Cannot take pictures on Android 8

2018-11-16 Thread GitBox
AutoAlert commented on issue #373: Cannot take pictures on Android 8
URL: 
https://github.com/apache/cordova-plugin-camera/issues/373#issuecomment-439537809
 
 
   Hi @jeffreyvdhondel thanks for the response. I tried your suggestion but 
unfortunately it still does not work, still the same error.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org