Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download ".apk" as ".apk"? (not as ".zip")

Tags:

android

I have a small problem. Some browsers are not downloading the ".apk" files correctly. How to download ".apk" as ".apk"? (not as ".zip") Some browsers are convert them to ".zip".

I mean, the ".apk" file on my server and some people calling me and asking, how to rename ".zip" to ".apk".

like image 920
user922907 Avatar asked Sep 04 '11 01:09

user922907


People also ask

Why is APK downloading as ZIP?

By default the APK blob that was uploaded had content type of application/zip and the same content type reflected in the reposnse header causing the downloaded file to get a . zip extension on Android OS when download was finished.

Are APKs just ZIP files?

Any APK file is a valid ZIP file. There's more to it than that - files that must be present, the fact that zipalign is normally used to align data structures within the file - but it's all valid ZIP.


1 Answers

Create a MIME-TYPE mapping of apk to application/vnd.android.package-archive. How you do this will vary on your web server.

like image 124
Stefan Kendall Avatar answered Sep 19 '22 20:09

Stefan Kendall