颤音:将URI转换为文件路径

发布于 2025-02-13 22:55:37 字数 348 浏览 3 评论 0原文

我在下载文件夹中有一个文件:

'/storage/emulated/0/Download/Music.mp3'

但是,在flutter中,我只会得到这样的uri:

'content://media/external/audio/media/906'

当使用uri_to_file插件时,我会得到一个临时文件名称:

'/data/data/com.myapp.testapp/files/uri_to_file/Music.mp3'

如何在下载文件夹中获取真实路径?

非常感谢!

I have a File in the Download folder:

'/storage/emulated/0/Download/Music.mp3'

but in Flutter I only get the Uri like this:

'content://media/external/audio/media/906'

when is use uri_to_file Plugin, I get a temporary file name:

'/data/data/com.myapp.testapp/files/uri_to_file/Music.mp3'

How can I get the real path in the Download folder ???

Thanks so much!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文