The upload server uses MIME sniffing to work out what type of file it's serving. As APKs are secret ZIP files, the MIME was being set to application/zip.
Android devices seemed to handle this badly, saving the file as xxx.apk.zip as opposed to xxx.apk.
APKs should be served with the MIME type of application/vnd.android.package-archive.
We shouldn't use octet-stream for these, because apparently this can cause issues on some devices.
Solution
I've added a new area for MIME overrides in rewrite.php. We check against the file name using regex to see if it ends with .apk. If so, we override the sniffed MIME type.
This area can be easily expanded in the future if more issues like this arise.
Fixes #119
The upload server uses MIME sniffing to work out what type of file it's serving. As APKs are secret ZIP files, the MIME was being set to
application/zip
.Android devices seemed to handle this badly, saving the file as
xxx.apk.zip
as opposed toxxx.apk
.APKs should be served with the MIME type of
application/vnd.android.package-archive
.We shouldn't use
octet-stream
for these, because apparently this can cause issues on some devices.Solution
I've added a new area for MIME overrides in
rewrite.php
. We check against the file name using regex to see if it ends with.apk
. If so, we override the sniffed MIME type.This area can be easily expanded in the future if more issues like this arise.