Specify where to save files to be downloaded in JavaScript

Asked 1 years ago, Updated 1 years ago, 35 views

What should I do if I use JavaScript to specify where to save the downloaded files?

Even if the directory in which the downloaded item is stored is set to ~/download by a browser, etc., I would like to ignore it and save it to ~/movies.

There is also FileSystem API, but only webkit is supported.
Is there any other good way?

javascript

2022-09-30 20:53

1 Answers

  • Especially without having to play with boot options or about:config
  • Not an extension or Chrome/Firefox OS
  • From Javascript on http(s) scheme

In that sense, I don't think it exists at the moment.It seems that there is a way to do something about it."However, regarding Chrome, I could only find information such as ""Isn't there no choice but to use NPAPI?""

Also, the FileSystem API is not a free access to a user's file system, but a virtual file system that is sandboxed for each app, such as Android or iOS.

The first time you invoke requestFileSystem(), a new storage is created for that application.Note that this file system is sandboxed.In other words, web applications cannot access files from other applications.Also, you cannot read or write to any folder on the user's hard drive, such as My Pictures or My Documents.
--- Quoted from http://www.html5rocks.com/ja/tutorials/file/filesystem/

Based on usage and API, it is possible to use SQLite as storage instead of actual file system.


2022-09-30 20:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.