简体   繁体   English

是否可以使用javascript以编程方式在Firefox文件打开对话框中设置“从:”字段

[英]Is it possible to programatically set the “from:” field in a Firefox file open dialog using javascript

I am generating a file open dialog which allows the user to download a blob I have generated in code. 我正在生成一个文件打开对话框,该对话框允许用户下载我在代码中生成的Blob。 This works fine but in Firefox the "from:" field on the open dialog looks like: 这可以正常工作,但在Firefox中,打开对话框中的“ from:”字段如下所示:

from: blob: 来自:blob:

Is it possible to programmatically set this with javascript so that I can specify the domain the data actually originates from? 是否可以使用javascript以编程方式进行设置,以便我可以指定数据实际源自的域?

For example if the blob was generated from data on www.stackoverflow.com I would like the open dialog to look like: 例如,如果blob是从www.stackoverflow.com上的数据生成的,我希望打开的对话框看起来像:

from: www.stackoverflow.com 来自:www.stackoverflow.com

No, you cannot influence the "From:" description in the Save dialog. 不,您不能影响“保存”对话框中的“发件人:”描述。 Otherwise folks would abuse this. 否则,人们会滥用这一点。

However, it is indeed unfortunate that blob URIs display this poorly. 但是,不幸的是,blob URI的显示效果很差。 Consider filing a bug (or even creating a patch) to rectify this. 考虑提交错误 (甚至创建补丁)来纠正此问题。

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

相关问题 使用JavaScript从扩展程序中以编程方式打开Firefox浏览器控制台? - Open the Firefox browser console programatically from within an extension using JavaScript? 使用javascript在Firefox上使用imacros打开文本文件 - open text file with imacros on firefox using javascript 如何使用javascript打开文件/浏览对话框? - How to open a file / browse dialog using javascript? 在磁盘上的新浏览器选项卡中使用 javascript 以编程方式打开 html 文件 - Open an html file programatically using javascript in a new browser tab from disk 是否可以使用Javascript捕获浏览器的“文件打开/保存”对话框事件 - Is it possible to catch browser's File Open/Save dialog event using Javascript Firefox上的Javascript打开文件 - Javascript open File on Firefox 使用javascript打开文件对话框 - Open file dialog with javascript 使用Firefox时,是否可以在Visual Studio中达到JavaScript文件中设置的断点? - Is it possible to hit a breakpoint set in a javascript file with visual studio while using Firefox? 通过JavaScript打开CRM 2011中某个字段的查找对话框 - Open the lookup dialog of a field in CRM 2011 from javascript 如何以编程方式在Firefox中打开文件对话框 - How to open programmatically the file dialog box in Firefox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM