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

iOS8 beta: files can't be selected with multiple set to true #1269

Closed
voodoo709 opened this issue Aug 22, 2014 · 16 comments
Closed

iOS8 beta: files can't be selected with multiple set to true #1269

voodoo709 opened this issue Aug 22, 2014 · 16 comments

Comments

@voodoo709
Copy link

When using iOS7 the demo page at http://fineuploader.com/demos.html uploads works fine however on iOS8 Beta 5 I’m unable to select an image to upload, has any testing been done with iOS8 as its due for release soon (few weeks)?

@rnicholus
Copy link
Member

Thanks for your report. Testing against iOS8 beta will start shortly, now that it is presumably close to release-candidate stable. I'll keep this updated with our findings and adjustments.

@rnicholus
Copy link
Member

Just tested myself with a simulator. Looks like a pretty serious bug in iOS8 beta to me. Apple historically has had a number of serious issues in mobile Safari with file input elements when the multiple attribute is present. This appears to be another such issue.

I was able to reproduce with a simple <input type="file" multiple>, no Fine Uploader involved. If you remove the multiple attribute, you are able to select a photo.

Can you confirm my observations?

@voodoo709
Copy link
Author

Once you have selected the image can you successfully upload it?

I’ve now tried a few websites and when an image can be selected the upload still doesn’t work, it hangs for a long time before saying something along the lines of:
“the server doesn't understand the request”

I did my own test using the code below and in iOS7 and it works fine and the properties of the file are displayed as seen in the attached image but again in iOS8 it just hangs and the upload wont complete

Upload.html
<form action="process.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
process.php
<?php
if ($_FILES["file"]["error"] > 0) {
  echo "Error: " . $_FILES["file"]["error"] . "<br>";
} else {
  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
  echo "Type: " . $_FILES["file"]["type"] . "<br>";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>

The issue is also present in Chrome on iOS8 so seem to be an issue with iOS8 rather than just Safari
image1

@rnicholus
Copy link
Member

First off, can you confirm my observations regarding the issue you initially reported ?

@voodoo709
Copy link
Author

Yes just checked and adding multiple to the input type="file" field results in not being able to select an image in my code above. With the multiple removed an image can be selected but the upload doesn’t work in both Safari and Chrome in iOS8 but is fine in iOS7.

@rnicholus
Copy link
Member

After a very simple test, with the multiple option set to false, uploads seem to work in iOS8 using Fine Uploader. I didn't try a form submit, as Fine Uploader doesn't upload files this way in modern browsers.

@rnicholus
Copy link
Member

Which device (running iOS8) are you using?

@rnicholus rnicholus added this to the 5.0.5 milestone Aug 22, 2014
@voodoo709
Copy link
Author

I’m using the current generation iPad Air and Mini’s below:

  1. iPad Air 16GB Model: A1474
  2. iPad mini 32GB Model: A1489

By the way adding multiple="false" to my code above still results in the image not being selectable, only when multiple is not present at all can I select an image.

Anyway it’s good to hear you have FineUploader working correctly with the quick modification as I’m looking to use it on my website.

@rnicholus
Copy link
Member

multiple="false" is no different that multiple, since it is a boolean attribute.

I've filed a bug with Apple regarding the initial issue you reported. Hopefully this will be fixed before iOS8 releases. If not, we'll consider forcing the multiple option to false in Fine Uploader for iOS8. This is similar to the approach we take to work around the bug in iOS7 that results in a 0-sized file uploaded when a video is selected with the multiple option set to true. In that case, if a video can be selected, we force the multiple option to be false in iOS7. #1039

@rnicholus
Copy link
Member

After some reflection, I think it is best to go ahead and incorporate a workaround for this bug in v 5.0.5 of Fine Uploader.

With the workaround, worst case is Apple fixes the bug before iOS8 releases and users can only select one file at a time (which is already the case in most instances, such as if the possibility of selecting a video isn't prohibited due to #1039).

If we don't include this workaround and Apple doesn't fix the issue before iOS8 goes live, worst case most users won't be able to select any files in iOS8 without re-deploying their apps that depend on Fine Uploader with the multiple option to set to false.

My hunch is that this bug will not be addressed by Apple before iOS8 releases, based on past experiences. I don't want to hold up 5.0.4, so this can be a 5.0.5 release. Any thoughts @feltnerm?

@feltnerm
Copy link
Contributor

👍 Agreed.

Apple, breaking the file input element since 2012 ...

@rnicholus
Copy link
Member

The bug I filed with Apple was closed as a duplicate of another. What that other bug looks like, I don't know. There is no way to access any bugs that you have not personally filed. This is a well-reported & noticed bug and that might result in a fix from Apple before release.

@rnicholus
Copy link
Member

I'm going to wait to release 5.0.5 until just after iOS8 releases. If the final version has this issue, I'll go ahead and release 5.0.5 immediately. Otherwise, I'll revert bca3f13 and then release 5.0.5.

@bjornbos
Copy link

Do you know if it has been solved by Apple?

@rnicholus
Copy link
Member

iOS8 doesn't release until the 17th.  The gold master build was just made available, but I haven't looked at it yet.  Nothing in the release notes though.

On Wed, Sep 10, 2014 at 2:50 AM, Bjorn Bos notifications@github.com
wrote:

Do you know if it has been solved by Apple?

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

@rnicholus
Copy link
Member

It's not clear if this issue is fixed due to a more serious regression in iOS8, described in #1284.

@rnicholus rnicholus changed the title FineUploader issue on iOS8 Beta5 iOS8 beta: files can't be selected with multiple set to true Sep 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants