I am using Java Spring as the backend and plain JS on the front-end.
User can download files from one of the pages on my application.
I want to know the path
where the file will be downloaded and saved.
Is it possible to do that?
I am using Java Spring as the backend and plain JS on the front-end.
User can download files from one of the pages on my application.
I want to know the path
where the file will be downloaded and saved.
Is it possible to do that?
User can download files from one of the pages on my application. I want to know the
path
where the file will be downloaded and saved.Is it possible to do that?
No.
It is not possible to get the file path which user selects to download file to programmatically. It is not a trivial matter to determine if user downloads file at all. Getting the file path of the downloaded file, if user downloads file, should require user action.
It is not clear from Question why path to downloaded file at user filesystem would be useful or necessary for an application.
An exception, which could be considered a bug Full path to file at local filesystem is set as value of textarea element when files are dragged and dropped at element; would be, at some browsers, where the file or folder path is mistakenly, or unknowingly exposed; for example, by dropping file or folder at a <textarea>
element. Though that case still would not verify that the same file which was downloaded would be exposed as a file path at user filesystem. User could change the name of the file at any time, both prior to download at Save File
dialog, and after file is saved at user filesystem.
Another exception, at chromium, chrome browsers, would be where file or folder is written to LocalFileSystem
.
See