Wednesday, 5 June 2019

How to upload non-image files from iPhone

The Problem

In my tests and according to many articles online, iPhones seem unable to select non-image files for web form uploads (even with the built-in file explorer, in which non-image files appear greyed out).

Here's an example of code that does not work, running on iPhone X, iOS 12.3, Safari:

<input type="file" accept="image/*, .pdf, .png, .gif, .jpg, .jpeg, .doc, .docx, image/png, image/jpg, image/jpeg, image/gif, application/msword, application/pdf" multiple>

I was ready to accept that iPhones do not have this capability, but then I read some forum threads indicating the contrary:

The Questions

  1. Is it true that it's possible to upload non-image files from the file browser on an iPhone through a web form?
  2. What do I need to do to trigger this functionality in my uploader code, without using Dropbox or other third-party storage vendors? Could the usage of Dropzone.js or the lack of SSL on the test server be contributing to the problem?


from How to upload non-image files from iPhone

No comments:

Post a Comment