With filepicker.io, is there a way to get the original file path? - filepicker.io

I am using filepicker.io and specially computer as main service.
I would like to get the original file path of a file uploaded through the API.
For example, if I upload a file located at /my/path/in/my/computer/file.zip, I will get in the FPFile object the filepicker.io URL but not the original file path.
Is there a way to get it ?
PS: I have tried to retrieve the stat of the file too without success.

Due to browser security limitations, the real local path of the file is never exposed to the javascript application. For more information, see http://davidwalsh.name/fakepath

Related

Flutter - Pick files and get their path or URI

With file_picker, I can't get file's real path or URI from FilePicker.platform.pickFiles(). It only returned something like this
/data/user/0/my_app_dir/cache/file_picker/file
and logged this
I/FilePickerUtils(27005): Caching from URI: content://com.android.providers.media.documents/document/video%3A1519
D/FilePickerUtils(27005): File loaded and cached
at:/data/user/0/my_app_dir/cache/file_picker/file
D/FilePickerDelegate(27005): File path:[com.mr.flutter.plugin.filepicker.FileInfo#705d9ef]
That's not what I want. I just want the real original absolute file path, the file information, regardless of what I'll going to do with the file. So I'm looking for a package that do that or the solution how to manually pick file and get the file path like I could do natively. Thank you in advance.
It's not impossible with native code. It's just package publisher who made it unavailable using it. Follow this to implement file path picker on native code. It works for me.

How to get local path of file in Flutter web

I'm using file_picker which give the path to the file in mobile, but in web the path is always null.
I read somewhere you can get the bytes of the file, but I couldn't understand how this it's done.
Right now I am trying to pick a video and showed on my web page with video_player, this method accepts a File.
So, is it possible to get the path of my video somehow and transformed to File?

Access downloaded pdf file path in HTML5 file system and display it in webview

In my chrome app, I am using HTML5 file system to save the pdf files to sand box.Downloading is working fine.But how do i access that downloaded file path? I want to give that path as webview source.
The best way, if it works, would be to use a filesystem URL. To get this use FileEntry.toURL
These don't work on external files (i.e. files that come from chrome.fileSystem.chooseEntry and are outside the app's sandbox) but should work for files in the app's sandbox.
Note, I am referring to filesystem:// urls not file://urls, which won't work as Marc Rochkind has pointed out in his answer.
Disclaimer: I haven't tested this, but I believe it should work.
You need to get the contents of the PDF into a data URL. See my answer to this question:
Download external pdf files to chrome packaged app's file system

Gwt- file path when uploading the file

Here i have stucked in simple concept.How to get the file-path when uploading the file in GWT. For example-(d:/example.xls) this is my upload-file. how to get this path programmatically? i have tried this
FileUpload ff=New FileUpload();
ff.getFileName();
when i use above code.it is returning only example.xls only.. help me
You can't access this information from GWT (and javascript in general)
I think, you cannot get the absolute path of a file that you have uploaded. The path will be absent or changed to avoid security risks, after you have done the upload.
You can get the file's name using the getFileName() function,
and even its content, with the HTML5 FileAPI.

Naming a file downloaded from url in iPhone

I would like to save a file downloaded from the internet in iPhone.
Can I use the url as the file name? If not, what transformation should I apply to the url to obtain a valid file name?
I need to find the local copy of the file later using its url.
Edit: Not asking where or how to write a file to disk. The question is limited to getting a valid file name from an url.
Can I use the url as the file name?
You can use just about anything you want for a file name. As long as it's a valid file name for the underlying file system.
If
not, what transformation should I
apply to the url to obtain a valid
file name?
This is unanswerable because there's no way to specify what "valid" means here.
I need to find the local copy of the
file later using its url.
You probably want to save it to your application's Documents directory. There already are plenty of questions relating to saving files on iPhone here on Stack Overflow, and I urge you to read some of them.
For lack of a better method, I'm using a persistent dictionary to map the urls to unique names.