In iOS 12 and 13, when selecting the HTML <input type="file" multiple> the browser/webview displays three options to upload files: take a photo, select from the photo gallery, or browse the file system.

It's possible to select multiple files using the photo gallery, but if I want to upload other types of files using the browse the file system option, multiple file selection is not possible and I can only select one.

Is this behavior is expected? If it is a bug, is there any walkarounds? In short, how can I handle this on the development side?

1

There are 1 best solutions below

0
On

There are currently (in iOS 15) two ways to do this. I do not know to what extent this might also work in iOS 12/13.

Choose Files

  • Pick Choose Files
  • Navigate to your location
  • Tap the circle menu at the top with the three horizontal dots
  • Tap "Select"
  • Tap the icons of the files you want to select
  • Tap "Open"

Drag and Drop

This requires two fingers and maybe a bit of practice ;)

  • Leave the form by swiping up to the App Switcher (or use the home button)
  • Go to your files app
  • Tap and hold on a file icon and then drag the file a bit. This can be tricky; if you start dragging too soon then you just scroll the whole page, if you start dragging too late then the long-click context menu will come up instead.
  • While still holding the now-floating icon with one finger, use another finger to tap on additional icons and add them to your selection. You can even navigate to other folders to gather more items, but be careful about releasing the selected items too early—this could result in moving items to whichever folder you have navigated to.
  • While still holding the floating icons with one finger, swipe out of the Files app with another finger and make your way back to the upload form in Safari.
  • Drag the floating icons over the Choose Files button and release — the dropped files are now ready to be uploaded.