Coder Social home page Coder Social logo

Comments (4)

PanayotCankov avatar PanayotCankov commented on May 22, 2024

I've reproduced a problem that throws:

JS: Error: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2346, uid=10054 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

Perhaps we should investigate any additional permissions that may be required when accessing files.
What files do you upload? The above was reproduced trying to upload an image selected with the nativescript-imagepicker.

from nativescript-imagepicker.

NicoleZA avatar NicoleZA commented on May 22, 2024

I am just picking any file from my gallery on my phone.
I have tried added different permissions but was unable to figure this one out

from nativescript-imagepicker.

PanayotCankov avatar PanayotCankov commented on May 22, 2024

We will check if we can integrate this in the plugin, although the permission is required at the time you try to read the file, not the time you pick the image.

You can try to ask for the permission using the following plugin:
https://www.npmjs.com/package/nativescript-permissions

from nativescript-imagepicker.

PanayotCankov avatar PanayotCankov commented on May 22, 2024

fileUri will always be unreliable in both platforms, in some cases there would be insufficient permissions, in others, the images may be still in the cloud and have yet to be downloaded. Please use getImage and getImageData. We are currently working toward making fileUri return simple null instead of crashing. After obtaining and image you can save it in you app temp files for further usage.

from nativescript-imagepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.