简体   繁体   中英

How to specify download location when open the full file download URL via chrome using Javascript

I'm thinking about how to specify download location using javascript. I got serveral the full file download URLs and use window.open(url, '_blank'); to start download them. However, all these files will be downloaded to the Chrome default path. How do I do to let them download to different folders?

This is currently not possible.

JavaScript doesn't have a file handling support unlike most languages.

This is due to security reasons and how quickly JavaScript was built in a short time with a lot of restrictions from Netscape.

Source: https://www.quora.com/How-can-I-code-in-JavaScript-to-download-my-files-to-a-specific-folder-where-I-want-to-save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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