I'm using this HTML5 input tag to upload files from different devices:
<input name="fileInput" type="file" id="fileinput" (change)="onChange($event)"/>
I don't want the user to be able to select multiple files from their device library. It works fine on android but in ios the user can select more than one file. Is there any way to disable multiple select on ios?
Related
I want to build a HTML5 form, in which user can submit audio file from the desktop, and for mobile device, user have to record the audio directly. I use the following html5 code for the audio input
<input type="file" accept="audio/*" id="capture" capture="microphone">
It works properly, but not iOS device, and which always give me .mov video files instead of any audio.
Is it the limitation of iOS? And is there any workaround for my case?
Looks like it's just not supported through iOS and it's been that way for a few versions. Check out this link from another post.
I've below code in asp.net ascx file.
<asp:FileUpload ID="selectedFiles" runat="server" onchange="ShowImagePreview(this);" CssClass="inputhidden" AllowMultiple="true" ClientIDMode="Static" />
There is some javascript code in ShowImagePrivew which preview the image on the page. The problem is every time we capture the image in iPhone, i'm getting the same name of the file while in Android Phones it is different on each image capture.
1) In order to test open the link in iPhone and Android. http://aspuploader.com/demo/form-multiplefiles.asp
2) Click on Select Multiple files and select Take Photo
3) Take snapshot and upload that file
4) Again try to upload one more image
Result:
iPhone - It replace the old file. It uses image.jpg as temporary file name.
Android - It upload another file as well. It appends datetime as well.
Expected output: iPhone also should be able to upload multiple images.
Any Solutions?
After lot of search I believe that it is not possible as it is default iPhone Behavior.
Also Refer: Mobile Safari Multiple Upload with Camera
I build a simple web page that should enable our users to use the camera to upload documents copy.
It works great in android but in iOS mobile safari its only open the image library and doesn't let the user to simple open the camera and take a shot.
I've used that input field:
<input style="width:100%" class="upload" id="house" type="file" accept="image/*" capture doc="house" name="files[]" data-url="/api/upload/detail" multiple>
At the end the solution was simple.
The "multiple" attribute should not be present or it will go right to the gallery without giving the user the option to choose the camera.
Nir
Now that Mobile Safari on iOS 6 supports capture and media library selection for photos and videos with the HTML5 input element is it possible to select videos with PhoneGap's camera.getPicture method?
<input type="file" accept="image/*, video/*" capture="camera" />
If not, a new camera.getMedia method which allows either media type would be great.
HTML5 file input for photos & videos on iOS6 Mobile Safari
HTML5 file input multimedia actions on iOS6 Mobile Safari
You can use navigator.camera.getPicture and set the MediaType to VIDEO in the options parameter.
The HTML file browse element isn’t working in iPad.
Example:
<input type="file" />
The choose file button always remains disabled.
You can’t upload files from an iPad in that way; iPad apps can’t browse the filesystem.
That's true. Safari Mobile doesn't support file transfer over HTTP.