简体   繁体   English

有没有办法将 PrimeNG p-fileUpload 组件设置为在自定义文件夹中打开?

[英]Is there a way to set the PrimeNG p-fileUpload component to open in a custom folder?

I'm using the PrimeNG p-fileUpload component to upload some files.我正在使用 PrimeNG p-fileUpload 组件上传一些文件。 When I press the select file button, I want the file explorer dialog to open in a custom default folder, for example Desktop, or Videos etc. Is there a way I can do that?当我按下 select 文件按钮时,我希望文件资源管理器对话框在自定义默认文件夹中打开,例如桌面或视频等。有什么办法可以做到这一点吗?

You can't do that, because security reasons.你不能那样做,因为安全原因。
And How you can be sure that the directory that you want exist in all computers?以及如何确定您想要的目录存在于所有计算机中?

You can't do it even on file input for regular html, it is forbidden for security reason as clients have different operating systems for instance desktop directory in windows doesn't exist in Mac Os您甚至不能在常规 html 的文件输入上执行此操作,出于安全原因禁止这样做,因为客户端具有不同的操作系统,例如 windows 中的桌面目录在 Mac Os 中不存在

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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