html5 file upload issue with iOS -
i'm having issues using html5 upload files in ios. on desktop can happily select multiple files , upload them. on ios 6.0 (the ios i've tested) if try , upload 2 files uploads first image twice. true whether have been selected in same input, or if form includes different inputs. form has more 1 file, first file repeated, replacing other files.
this code below , similar code multiple input fields work on android chrome, windows ie, windows chrome, & mac firefox.
<form class="upload" action="uploadservlet" method="post" enctype="multipart/form-data"> <fieldset> <input id="filename" type="file" name="file" size="10" multiple/> <input id="submitbutton" name="submit" type="submit" value="submit"/> </fieldset> </form>
the same issue different code related multiple uses of camera:
<form class="upload" action="uploadservlet" method="post" enctype="multipart/form-data"> <fieldset> <input id="filename" type="file" name="name" size="10" capture="camera"/> <input id="filename1" type="file" name="name1" size="10" capture="camera"/> <input id="submitbutton" name="submit" type="submit" value="submit"/> </fieldset> </form>
many in advance! richard
with of colleague tracked down. turns out images being passed ios given filename image.jpg. causing server save each file on each other. simple fix dynamically name uploaded images on server side.
on php backend, found html input name attribute needed [] ie:
<input id="filename" type="file" name="file[]" size="10" multiple/>
Comments
Post a Comment