提供 iPhone .ipa 文件的正确 mime 类型是什么?

发布于 2024-09-19 04:37:58 字数 375 浏览 2 评论 0原文

我正在尝试将 .ipa 文件发布到我们的 apache Web 服务器上,以供 Beta 测试人员下载。目前,我在 .htaccess 中使用以下行来提供文件:

AddType application/octet-stream .ipa

这在 Safari 和 Firefox 中效果很好,但在 IE 中,.ipa 扩展名被删除,并替换为 .zip。因此,IE 用户将获得 MyApp.zip,而不是 MyApp.ipa。

我知道我可以在将所有 .ipa 文件放到服务器上之前将其压缩,然后我就不必处理任何这些问题,但如果有更优雅的解决方案服务器,我想避免这个额外的步骤-边。

或者更确切地说,是否可以简单地阻止 IE 更改文件扩展名?

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

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.

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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉城已无爱 2024-09-26 04:37:58

我投票赞成其他答案,因为它们都很有帮助,但这就是我最终需要解决问题的。

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

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>
聊慰 2024-09-26 04:37:58

.ipa 文件一个zip 文件:

$ file 'Kindle 2.2.1.ipa' 
Kindle 2.2.1.ipa: Zip archive data, at least v1.0 to extract

这可能就是 IE 帮助您更改扩展名的原因。 Microsoft 的文档似乎表明情况可能如此:

Internet Explorer 根据 HTTP 服务器和文件本身提供的一些信息来设置下载文件的文件扩展名。

A .ipa file is a zip file:

$ file 'Kindle 2.2.1.ipa' 
Kindle 2.2.1.ipa: Zip archive data, at least v1.0 to extract

That's likely why IE is helpfully changing the extension for you. Microsoft's documentation seems to indicate that might be the case:

Internet Explorer sets the file name extension of a downloaded file based on a few pieces of information available from the HTTP server and from the file itself.

倾城月光淡如水﹏ 2024-09-26 04:37:58

我建议您研究 Hockey 这似乎是分发 Ad Hoc 的好方法更新更加无缝。不过基于php。

I suggest you look into Hockey which seems like a good way to distribute Ad Hoc updates more seamlessly. php based though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文