简体   繁体   English

Flutter 文件选择器创建符号链接

[英]Flutter file picker creates symlinks

I have battled this issue for sometime now and i seem to be going nowhere, I am using file_picker flutter plugin, its working on devices with android v7, now am running the app on emulator with android v9 and the filepicker creates symlink, here is a log:我已经与这个问题作斗争了一段时间,我似乎无处可去,我正在使用file_picker flutter 插件,它在使用 android v7 的设备上工作,现在正在使用 ZC31B32364CE19CA8ZFCD150A417ECCE58Z v7 的模拟器上运行应用程序,这里是 vfilepicker7ECCEs5日志:

I/FilePickerUtils( 7999): File loaded and cached at:/data/user/0/com.lulliezy.videostatus/cache/file_picker/KHALIGRAPH JONES x SARKODIE - WAVY (OFFICIAL VIDEO).webm
I/FilePickerDelegate( 7999): Absolute file path:/data/user/0/com.lulliezy.videostatus/cache/file_picker/KHALIGRAPH JONES x SARKODIE - WAVY (OFFICIAL VIDEO).webm

Now my understanding bt the word cached is a symlink is created, now how do i disable this feature or rather, get the original file name with this code:现在我的理解是缓存这个词是一个符号链接,现在我如何禁用这个功能,或者更确切地说,用这个代码获取原始文件名:

await FilePicker.getFile(
  type: FileType.custom,
  allowedExtensions: ['mp4', 'webm'],
);

Thanks in advance.提前致谢。

EDIT编辑

I should clarify, am using flutter ffmpeg so it complains with file does not exists.我应该澄清一下,我正在使用 flutter ffmpeg 所以它抱怨文件不存在。

I actually found a workaround for this, I copied the picked file to another temporary directory and used that new path after which when am done, I delete the copied file.我实际上找到了一个解决方法,我将挑选的文件复制到另一个临时目录并使用该新路径,完成后,我删除了复制的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM