Set download path

前端 未结 2 1565
时光说笑
时光说笑 2020-12-11 18:00

I have a web application that receives a simple text file, but I need this file to be downloaded to a specific path. Meaning, when the application receives a text file, it

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 18:31

    JavaScript cannot exert any control over my (the visitor's) local filesystem. I remain in complete control of where my downloaded files go, what they are named, and indeed whether I even want to download them in the first place.

    Sorry, but the best you can do is inform your users where to put the file you're offering for download. You cannot use JavaScript to choose the destination yourself.

提交回复
热议问题