Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

iOS8 GM file input element does not allow files to be read client-side or uploaded to server #1284

@rnicholus

Description

@rnicholus
Member

This is a serious bug that prevents any sort of file uploads in iOS8 Safari. There is no known workaround. Below is the content of the bug report I filed with Apple.

Summary:
It seems like there is some issue with access to the files associated with an <input type="file"> element.

A few big issues:

  1. FileReader can't seem to read any files associated with a <input type="file">.
  2. URL.createObjectURL with a file associated with the element returns an object URL that has no content when loaded.
  3. If files are uploaded to a server, even via a simple multipart-encoded form submit, no actual file bytes are sent with the request.

None of these issues occurs in Chrome on iOS8, only Safari.

Steps to Reproduce:

  1. Create a simple form with a file input and a submit button
  2. Create a simple PHP server that handles file uploads via a multipart encoded POST request.
  3. Load the page, select a file, press submit

Expected Results:
File is saved to the server.

Actual Results:
Either an empty file is saved to the server, or the page loading indicator spins forever after clicking submit due to the lack of file bytes included in the request by Safari.

Version:
8.0 (12A365)

Configuration:
iPad

Activity

PatrickBK

PatrickBK commented on Sep 11, 2014

@PatrickBK

I experience the same issue with iOS 8 GM as well as the previous beta. I see it happening on an iPhone 5s as well as an iPad Air

rnicholus

rnicholus commented on Sep 11, 2014

@rnicholus
MemberAuthor

Yes, it seems Apple knew about all of these bugs, chose to ignore them and release a gold master anyway. Hopefully they come to their senses and fix this before release.

bjornbos

bjornbos commented on Sep 11, 2014

@bjornbos

Wow, this sucks big time! How about adding a detection feature to FineUploader for iOS8 and Safari, so that we can ask users to switch to Chrome?

bjornbos

bjornbos commented on Sep 11, 2014

@bjornbos

Even more strange: if you pin a website to your homescreen and then start it from there (run it as a single app), the upload works!

rnicholus

rnicholus commented on Sep 11, 2014

@rnicholus
MemberAuthor

As you suggested, UIWebView does not seem to suffer from these issues.

Regarding your suggestion to encourage users to switch to Chrome - keep in mind that video uploads are not possible in Chrome iOS8 at this time due a bug described in #1283.

I've outlined all new and existing browser-based-upload issues present in iOS in a blog post published yesterday.

bjornbos

bjornbos commented on Sep 11, 2014

@bjornbos

Yes I am aware of the Chrome issue(s), it was more of an example of a message to show. It could also be used to ask the user to pin the website to the homescreen, or just to point out the bug from Apple.

rnicholus

rnicholus commented on Sep 11, 2014

@rnicholus
MemberAuthor

Not sure what we are going to do yet, but it will likely be a decision we finalize shortly before iOS8 releases, just in case Apple fixes these issues and issues a new pre-release build.

added this to the 5.0.5 milestone on Sep 14, 2014
rnicholus

rnicholus commented on Sep 14, 2014

@rnicholus
MemberAuthor

I'm going to have to explore the pinning workaround a bit more. It may be tricky or even impossible to distinguish between a page traditionally loaded in iOS8 Safari and one loaded via a home screen icon. If we can, we will have to display some sort of message for Fine Uploader UI integrations when using iOS8 on Safari. Maybe something similar to what we did in #680.

rnicholus

rnicholus commented on Sep 16, 2014

@rnicholus
MemberAuthor

@bjornbos Adding the site to your home screen does not appear to work around the issue for me.

31 remaining items

bjornbos

bjornbos commented on Sep 26, 2014

@bjornbos

It's still kind of buggy... I often get a forced page reload (crash) when uploading multiple items (iPad mini with 8.0.2).

rnicholus

rnicholus commented on Sep 26, 2014

@rnicholus
MemberAuthor

@bjornbos Is this a new issue as of iOS8? What features do you have enabled on your uploader?

bjornbos

bjornbos commented on Sep 26, 2014

@bjornbos

I'm trying to figure out whether this is linked to browser uploading or that the new iOS crashes the device more often in general. I will play around with this some more over the weekend.

rnicholus

rnicholus commented on Sep 26, 2014

@rnicholus
MemberAuthor

I just uploaded a handful of files and a video in iOS 8.0.2 on an iPhone 5 w/ scaling turned on (using Safari). Everything looks ok at first glance. Going to confirm on an iPad as well.

We'll release 5.0.7 that locks this workaround to anything older than iOS 8.0.2.

added this to the 5.0.7 milestone on Sep 26, 2014
bjornbos

bjornbos commented on Sep 26, 2014

@bjornbos

FYI: I never experienced the crash in the first upload session in the browser. For it to happen I selected multiple files, waited for these to be uploaded, and then started a new upload session without refreshing the browser.

rnicholus

rnicholus commented on Sep 26, 2014

@rnicholus
MemberAuthor

I'm not able to reproduce.

2 remaining items

bjornbos

bjornbos commented on Sep 28, 2014

@bjornbos

Looks like there is difference between iPad and iPhone. On iPhone everything works smoothly, but on iPad the upload process crashes the browser frequently. I'm also getting this feedback from my users now...

rnicholus

rnicholus commented on Sep 28, 2014

@rnicholus
MemberAuthor

I'll see if I can reproduce next week.  Unfortunately, iOS8 in general is a train wreck, and this is becoming more common with apple software.  You might want to encourage users tied to Apple devices to stick with iOS7, or, better yet, iOS6.

On Sun, Sep 28, 2014 at 3:46 PM, Bjorn Bos notifications@github.com
wrote:

Looks like there is difference between iPad and iPhone. On iPhone everything works smoothly, but on iPad the upload process crashes the browser frequently. I'm also getting this feedback from my users now...

Reply to this email directly or view it on GitHub:
#1284 (comment)

anazar

anazar commented on Sep 30, 2014

@anazar

@rnicholus - any eta on the 5.0.7 release? 5.0.6 blocks uploading on ios 8.0.2... we'd like to re-enable uploading since it's supported now.

rnicholus

rnicholus commented on Sep 30, 2014

@rnicholus
MemberAuthor

No ETA at the moment. You can disable the workaround via the new workarounds option. http://docs.fineuploader.com/branch/master/api/options.html#workarounds

rnicholus

rnicholus commented on Oct 1, 2014

@rnicholus
MemberAuthor

Fine Uploader 5.0.7, released today, will only target iOS 8.0.0 safari for this workaround.

bjornbos

bjornbos commented on Oct 5, 2014

@bjornbos

I found out that it is not the upload process that crashes the browser on the iPad with iOS8+, but it's the image scaling. I now change the scaling option parameter to false for iPad iOS8+ users, but you might want to build this into the iOS8 workaround feature as default.

rnicholus

rnicholus commented on Oct 5, 2014

@rnicholus
MemberAuthor

We will look into the iPad specific issue you have mentioned in the near future.

On Sun, Oct 5, 2014 at 10:26 AM, Bjorn Bos notifications@github.com
wrote:

I found out that it is not the upload process that crashes the browser on the iPad with iOS8+, but it's the image scaling. I now change the scaling option parameter to false for iPad iOS8+ users, but you might want to build this into the iOS8 workaround feature as default.

Reply to this email directly or view it on GitHub:
#1284 (comment)

jkodroff

jkodroff commented on Apr 8, 2015

@jkodroff

@rnicholus What's your feel on the issues with iOS8? Have they been largely resolved with 8.latest, or are they still present?

rnicholus

rnicholus commented on Apr 8, 2015

@rnicholus
MemberAuthor

This particular issue was resolved in iOS 8.0.1.

added a commit that references this issue on Aug 17, 2024
7e69916
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @anazar@jkodroff@PatrickBK@karpitsky@rnicholus

        Issue actions

          iOS8 GM file input element does not allow files to be read client-side or uploaded to server · Issue #1284 · FineUploader/fine-uploader