2

我有一个带有Web服务器Mongoose的嵌入式系统,我必须允许客户端下载一些运行时生成的日志文件,我在下载过程中遇到问题,实际上,浏览器首先下载文件然后询问保存位置文件 。这种行为令人不快,因为下载需要几秒钟,而且客户端不明白发生了什么。是否有任何选项,例如,在文件的标题中,强制浏览器在下载之前询问保存文件的位置?

谢谢。

4

1 回答 1

2

it is not up to you to decide how the client's browser is behaving. if the browser is set to save the file automatically in a specific place, then there is nothing you can do.

your only workarounds is to either upload your file somewhere and suggest the viewer to right-click a download link that points to the file, it will open the dialog,

or suggest the viewer to change browser settings,

or write a browser extension that does that and offer viewers to install it.

于 2014-03-13T15:23:15.470 回答