本文介绍了Internet Explorer从下载时删除.exe扩展名,后跟URL参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在从Amazon S3提供文件,并使用API​​生成安全的URL。除了人们在IE中下载.exe文件之外,其他地方都很棒。我已经在IE 8和7上进行了测试。

I am serving files from Amazon S3 now, and I generate a secure URL using the API. Works great everywhere except for people downloading .exe files in IE. I have tested this on IE 8 and 7.

如果运行本地Web服务器,可以通过将notepad.exe放在您的Web根目录中进行测试。
转到(或等价物)
现在尝试?

If running a local webserver you can test by putting notepad.exe in your web root. Go to http://localhost/notepad.exe (or equivalent)Now try http://localhost/notepad.exe?

它应该将文件保存为记事本,无需扩展名。这是一个功能,因为谷歌搜索没有什么。感谢IE扩展的整个问题,您无法在文件扩展名上搜索任何内容。

It should save the file as notepad, without extension. Is this a 'feature' because googling it is coming up with nothing. Thanks to the whole issue of IE extensions, you can't search for anything on file extensions.

此外,如果文件在名称中有多个句点,则有时会将[1]或[]添加到结尾。

Also, if the file has multiple periods in the name, it sometimes gets a [1] or [] added to the end.

任何想法?文件这个可怕的行为?它似乎是一个安全功能,但我还没有找到一个禁用它的选项。

Any ideas? Docs on this terrible behavior? It seems like it must be a security feature, but I have yet to find an option to disable it.

和往常一样,谢谢。
Tim

And as always, thank you.Tim

推荐答案

这里有一个很长的故事,但简单的解决方法是这样做:

There's a long story here, but the simple workaround is to do this:

至于尾随[1]或什么,没有如果用户碰巧从该网址下载了,那么就没有什么可以做的。

As for the trailing [1] or whatnot, no, there's not really anything you can do about that if the user happens to have downloaded from that URL before.

这篇关于Internet Explorer从下载时删除.exe扩展名,后跟URL参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 15:28