Uploading files over HTTP fails on iOS 8.0.0 GM Safari

前端 未结 4 1929
南笙
南笙 2020-12-04 16:29

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 stuc

相关标签:
4条回答
  • 2020-12-04 17:08

    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/

    0 讨论(0)
  • 2020-12-04 17:17

    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

    0 讨论(0)
  • 2020-12-04 17:23

    Actually the file upload works fine on IOS 8 (safari) if the image comes from screen shot and not from the iphone camera. For example, if you take a photo from you camera on iphone and try to upload the file via browser ( input type=file), it will send an empty data
    src: "data:,"

    while if you send the same image to your email and download it from your email and upload it again it works or if you take a screen shot photo it works as below src: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgGYATIAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkK....# ..."

    Any idea or hint please us know. Angluar JS is being used for file upload and NodeJS on the server Regards, Alan Mehio

    0 讨论(0)
  • 2020-12-04 17:28

    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.

    0 讨论(0)
提交回复
热议问题