提供 iPhone .ipa 文件的正确 mime 类型是什么?
我正在尝试将 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我投票赞成其他答案,因为它们都很有帮助,但这就是我最终需要解决问题的。
I voted up the other answers as they were both helpful, but this is what I ended up needing to fix the problem.
.ipa
文件是一个zip 文件:这可能就是 IE 帮助您更改扩展名的原因。 Microsoft 的文档似乎表明情况可能如此:
A
.ipa
file is a zip file:That's likely why IE is helpfully changing the extension for you. Microsoft's documentation seems to indicate that might be the case:
我建议您研究 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.