允许使用Angular FileSaver.js选择目录 [英] Allow to choose directory using Angular FileSaver.js

查看:126
本文介绍了允许使用Angular FileSaver.js选择目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 FileSaver.js 从Angular保存文件.

I am using FileSaver.js to save files from Angular.

但是,我想允许用户选择目录.

However, I would like to allow the user to choose the directory.

我该怎么做?

推荐答案

我认为这是不可能的.浏览器可以选择是向用户显示另存为.."对话框,还是仅自动下载到下载"文件夹.

I don't believe this is possible. It is the browser's choice whether to present the user with a "Save As.." dialog box, or whether to just automatically download to the "Downloads" folder.

例如,这是用于控制此行为的Chrome的设置 :

For example, here is the setting for Chrome that controls this behaviour:

这篇关于允许使用Angular FileSaver.js选择目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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