You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/06 09:08:14 UTC

[GitHub] [cordova-plugin-camera] clarklight opened a new issue #761: Not allowed to load local resource

clarklight opened a new issue #761:
URL: https://github.com/apache/cordova-plugin-camera/issues/761


   Not displaying Photo after success call back 
   Not allowed to load local resource
   
   ### What is expected to happen?
   After taking a photo, using the file path to display the photo, by setting it into the src tag.
   
   ### What does actually happen?
   The image display is broken and the console is showing
   Not allowed to load local resource: 
   The file path is as such:
   file:///data/user/0/com.abc123.abc123app/cache/1630904187041.jpg
   
   
   ### Command or Code
   navigator.camera.getPicture(onPhotoDataSuccess, onFail, {
       quality: 100,
       targetWidth: 1000,
       targetHeight: 1330,
       destinationType: Camera.DestinationType.NATIVE_URI,
       saveToPhotoAlbum: true,
       correctOrientation: true 
   });
      
   
      function onPhotoDataSuccess(imageURI) {
         console.log(imageURI);
        var cameraImage = document.getElementById('image');
        cameraImage.src = imageURI;
   }
   
   function onFail(message) {
       console.log(message);
   }
   
   
   
   Building on:
   Cordova Android 10.0.1
   Camera plugin version 6.0.0
   Testing on:
   Samsung s10e
   
   
   
   Thanks
   Clark
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] clarklight commented on issue #761: Not allowed to load local resource

Posted by GitBox <gi...@apache.org>.
clarklight commented on issue #761:
URL: https://github.com/apache/cordova-plugin-camera/issues/761#issuecomment-916617750


   > I have the same problem
   
   Do we know if it has anything to do with the google changing secure storage location? 
   I have no idea what is the causes for this. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] veronicatc commented on issue #761: Not allowed to load local resource

Posted by GitBox <gi...@apache.org>.
veronicatc commented on issue #761:
URL: https://github.com/apache/cordova-plugin-camera/issues/761#issuecomment-923316045


   I have the same issue. I use destinationType = FILE_URI.
   
   The camera plugin is returning this for example for a photo selected from Downloads folder:
   
   content://com.android.providers.downloads.documents/document/msf%3A48
   
   And I get the error "Not allowed to access local resource" when setting it in the src of an IMG tag.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] JonSmart commented on issue #761: Not allowed to load local resource

Posted by GitBox <gi...@apache.org>.
JonSmart commented on issue #761:
URL: https://github.com/apache/cordova-plugin-camera/issues/761#issuecomment-998132559


   Base64 has provided us with a number of different issues in the past, we have found the file route to be more reliable - interested to understand the optimum solution from the internal team given the Cordova Android release deemed the storage as "Insecure". (ref: https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] alexandremsouza1 commented on issue #761: Not allowed to load local resource

Posted by GitBox <gi...@apache.org>.
alexandremsouza1 commented on issue #761:
URL: https://github.com/apache/cordova-plugin-camera/issues/761#issuecomment-916515880


   I have the same problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org