什么是正确的MIME类型为服务的iPhone .ipa文件? [英] What is the correct mime-type for serving an iPhone .ipa file?

查看:630
本文介绍了什么是正确的MIME类型为服务的iPhone .ipa文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试后的.ipa文件到我们的Apache Web服务器为我们的beta测试者下载。目前我使用下面的一行在.htaccess来提供文件服务:

I'm trying to post .ipa files onto our apache web server for our beta testers to download. Currently I'm using the following line in .htaccess to serve the files:

AddType application/octet-stream .ipa

这伟大工程在Safari和Firefox,但在IE中的.ipa扩展被删除,而不是替换为.ZIP。因此,而不是MyApp.ipa中,IE用户将获得MyApp.zip。

This works great in Safari and Firefox, but in IE the .ipa extension is removed and is instead replaced with .zip. So instead of MyApp.ipa, IE users will get MyApp.zip.

我知道我可以只是压缩了所有的.ipa的投入到他们的服务器之前,然后我就不会去处理任何的这一点,但我想,以避免额外的步骤,如果有一个更优雅的解决方案的服务器端。

I know that I could just zip up all the .ipa's before putting them onto the server and then I wouldn't have to deal with any of this, but I'd like to avoid that extra step if there is a more elegant solution server-side.

或者更确切地说,是不是可以简单地prevent IE从改变文件扩展名?

Or rather, is it possible to simply prevent IE from altering the file extension?

推荐答案

我投了其他的答案,因为他们都是有帮助的,但是这是我最终需要解决的问题。

I voted up the other answers as they were both helpful, but this is what I ended up needing to fix the problem.

AddType application/octet-stream .ipa
<Files *.ipa>
  Header set Content-Disposition attachment
</Files>

这篇关于什么是正确的MIME类型为服务的iPhone .ipa文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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