Giter Club home page Giter Club logo

Comments (4)

kinex avatar kinex commented on July 18, 2024

The returned path is a content provider path (not a file system path). What do you need the path for? For reading the file or displaying the path?

The function could be improved to return the full content provider URI and not only the path. So instead of returning
/document/primary:Download/image.jpg

it could return
content://com.android.externalstorage.documents/document/primary:Download/image.jpg

For more information about content providers see:
https://developer.android.com/guide/topics/providers/content-provider-basics

See also:
https://stackoverflow.com/questions/5657411/android-getting-a-file-uri-from-a-content-uri

But I am not sure how is it possible to utilize the returned content provider URI in Flutter/Dart unless you have some related plugin which accepts content provider URIs.

from flutter_file_dialog.

nicoechaniz avatar nicoechaniz commented on July 18, 2024
The returned path is a content provider path (not a file system path).
What do you need the path for? For reading the file or displaying the path?

We only need the path (the actual path to the existing file in the filesystem, not a new copy/cache) so we can tell the backgound service (Retroshare) to add the file to it's shared files. Retroshare will then read the file when it needs to. The rationale behind this is that the user must be able to share existing files without taking up additional space by copying them.

Is this possible?

from flutter_file_dialog.

kinex avatar kinex commented on July 18, 2024

This is now available in 2.1.0, see OpenFileDialogParams.copyFileToCacheDir

from flutter_file_dialog.

selankon avatar selankon commented on July 18, 2024

Hi,

This return the filepath in android uri scheme, example:

content://com.android.providers.media.documents/document/image%3A2355

Is there a way to get absolute file path? thanks

from flutter_file_dialog.

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.