Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct mime-type for serving an iPhone .ipa file?

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?

like image 471
Greg W Avatar asked Sep 16 '10 16:09

Greg W


Video Answer


2 Answers

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> 
like image 116
Greg W Avatar answered Sep 21 '22 01:09

Greg W


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.

like image 40
Carl Norum Avatar answered Sep 18 '22 01:09

Carl Norum