Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading files over HTTP fails on iOS 8.0.0 GM Safari

UPDATE:
Confirmed: This has been fixed on the iOS 8.0.2 update.

Using PUT/POST to upload file(s) over HTTP seems to get stuck on Sending Request Headers on mobile Safari on iOS 8 GM build.

I have an example here:

  • Open an HTTP monitor on your desktop and route your iOS 8 device through it
  • Login
  • Add a file
  • Hit Upload
  • It gets stuck on Initializing (which is sending request headers)

This is the case even on http://m.facebook.com
- Try to add a photo to your status and it fails.

This only happens when the request contains a file. This is reproducible irrespective of having multiple enabled/disabled in the file input. Uploads work fine on Chrome on iOS 8.

Did anyone else experience this too? Is there a way to successfully send files over HTTP on iOS 8 Safari?

like image 275
kayasky Avatar asked Sep 11 '14 15:09

kayasky


People also ask

How do I upload something to Safari?

2, there's a workaround: simply drag a file or files onto the upload button. The upload buttons lights up when the cursor lands on top of them. Some sites are designed to allow drag-and-drop, and may show other animation or a confirmation as to the target.


3 Answers

This was a bug in iOS 8.0.0 and was fixed in 8.0.2. The file body is not included in the request payload, but Content-Length is set as if it is.

See blog post File uploads appear to be broken in Safari on iOS 8.

like image 175
Dmitry Mukhin Avatar answered Oct 22 '22 08:10

Dmitry Mukhin


Update: Apple released iOS 8.0.2 yesterday and has fixed the upload bug.

File upload are broken in iOS 8.0. All files uploaded in Mobile Safari return 0-sized [1].

Hopefully this gets fixed by Apple in the next release. It seems like it is not affecting home screen webapps though:

File uploads are broken!! Every file upload is not working, you can select a file or take a picture and after that JavaScript will not get any data, as well as the server on a POST upload through HTML or XMLHttpRequest upload. The problem doesn’t seem to apply for home screen webapps.

Source: http://www.mobilexweb.com/blog/safari-ios8-iphone6-web-developers-designers

[1] http://blog.fineuploader.com/2014/09/10/ios8-presents-serious-issues-that-prevent-file-uploading/

like image 21
owdco Avatar answered Oct 22 '22 07:10

owdco


We're seeing similar issues in WordPress. All iOS8 GM uploads lead to 408 (http status, timeouts). Strangely enough, iOS8b5 was leading to error-500. Uploads are peachy under 7.1.*.

https://core.trac.wordpress.org/ticket/29602#comment:17

like image 6
stephdau Avatar answered Oct 22 '22 09:10

stephdau