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:
- From 2017: https://forums.macrumors.com/threads/uploading-non-picture-files-with-safari-in-ios.2031002/
- From 2018: https://discussions.apple.com/thread/8426336
The Questions
- Is it true that it's possible to upload non-image files from the file browser on an iPhone through a web form?
- 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