iFixit / iFixitAndroid

Official iFixit Android App
https://play.google.com/store/apps/details?id=com.dozuki.ifixit
GNU General Public License v3.0
162 stars 88 forks source link

Image Upload: Use correct mime type #262

Closed kwiens closed 6 years ago

kwiens commented 8 years ago

This app uploads files with the wrong content-type.

It's sets the type to www-form-urlencoded. Apache will try to parse (as form data) the first 'post_max_size' bytes of these POST requests. This process is not needed (we just read the whole POST body anyway) and it's grossly inefficient (RAM usage of 4.5 * upload size).

We've fixed this on the server side but it would be nice to not rely on that forever.

I believe the mime type should be application/octet-stream.

Private repo context link: https://github.com/iFixit/server-templates/pull/1006#issuecomment-230110029