-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploaded files always come as application/octet-stream #9
Comments
Thanks for pointing this out. We haven't checked this yet, so can you tell what platform versions this happens on?
By the way, you should neither rely on file extensions nor on MIME types for security checks. For all other purposes, that may be fine, of course. |
I tested on 4.4.4 and 4.1.2, the behavior is the same. Thanks for the advice, my application does not rely on mime types anymore
|
Well, on 4.4.4, file uploads should not be available at all. Apart from that, you're right, file uploads should work as in the user's normal browser. We have tested MIME type detection with this library and it seems to work as intended. Generally, most browsers detect the MIME type by looking at the file extension, anyway. Can you please check what MIME type is detected if you upload the same image from your desktop browser or from the Android system browser? |
This has now been tested on platforms both with the old File uploads are working fine and MIME types are added by the
You should inspect the raw HTTP request and see if you're receiving this as well. If not, this may be due to the file you upload, the form HTML or the browser that is used -- but it seems at least with this library, everything is fine in that respect. |
I will look into that. Just to let you know that I will be working for the Thanks for the support, though. Em Fri Jan 23 2015 at 22:11:23, Marco [email protected] escreveu:
|
It turned out there is some special (and wrong) behaviour on Android 4.4.3 and 4.4.4 which is explained here: #14 |
Hello,
Is there a way to fix this? My backend depends on the mime-type to detect valid images and has problems to receive files from Android because of this...
Thanks.
The text was updated successfully, but these errors were encountered: