如何在下载之前强制打开文件浏览器以保存文件? [英] How to forcefully open the file browser to save the file before downloading?

查看:332
本文介绍了如何在下载之前强制打开文件浏览器以保存文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的Chrome浏览器强制打开用于下载的对话框(即另存为)。无需手动更改Chrome浏览器中的下载设置。
有没有办法使用angular js或javascript?

OR



强制chrome浏览器打开文件浏览器,在使用JavaScript和/或AngularJs下载文件之前询问要保存文件的位置? 欢迎来到所以!



由于安全原因,无法执行您的建议。您无权选择文件在其操作系统上的位置。 JS不会比用户的浏览器更深入。您所要求的基本上是FS(文件系统)读写权限。



在提出新问题之前,请务必做一些四处搜寻,因为这个问题已经存在在这里回答: HTML页面中的目录选择器


I want my chrome browser to forcefully open dialog box for download(i.e Save As). Without manually changing the settings for Downloads in chrome browser. Is there a way doing it using angular js or javascript?

OR

How can I force the chrome browser to open file browser asking where to save the file before downloading using JavaScript and/or AngularJs?

解决方案

Welcome to SO!

There is no way to do what you're suggesting for security reasons. You don't have rights to choose where the file will go on their OS. JS won't go any deeper than the user's browser. What your asking for is essentially FS (file system) read-write permissions.

Make sure to do a little searching around before you ask new questions, as this one was already answered here: Directory Chooser in HTML page

这篇关于如何在下载之前强制打开文件浏览器以保存文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆