Giter Site home page Giter Site logo

Comments (3)

natsuk4ze avatar natsuk4ze commented on July 22, 2024

Hi @iqfareez . Thanks for your contribution🤝
First, there are some limitations depending on the platform.

  1. iOS/macOS does not allow us to get the direct file path of a media file, so you have to get the local URL e.g. file:///var/mobile/Media/DCIM/118APPLE/IMG_8371.MOV. In addition, this is not possible with NSPhotoLibraryAddUsageDescription, which would require additional permissions.

  2. file paths and URLs cannot be used permanently as they can be changed by the system or the user.

  3. changes to media files should always be made via the platform's API and should not be changed or deleted directly using the path.

I would like my app to have function to open image directly quickly after saving.

Does this mean opening the Gallery app? If not, the easiest way seems to be to display the images using the path to the temporary directory used to store the files.

final imagePath = '${Directory.systemTemp.path}/image.jpg';
await Dio().download('$url',imagePath);
await Gal.putImage(imagePath);
// Open imagePath //

If you tell me more about your Use Case, I may be able to suggest a better way.

from gal.

github-actions avatar github-actions commented on July 22, 2024

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, Thanks for your contribution.

from gal.

mcosti avatar mcosti commented on July 22, 2024

Hi, I do have a usecase. I am building a share to instagram story functionality and on Android it's limited, it requires passing a file from MediaStore instead of the app's cache.

I am using Gal for a different functionality, so it would be great to be able to use the same one here

from gal.

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.