Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

input type=file not working in iOS

I am developing application for iOS using phonegap.I want to upload my local files like image, songs, videos present on the device to the server. For this I have used <input type="file"> for the browsing the file hierarchy . Its working fine on the browser but when I am running this on iPad choose File button getting disabled.I have googled lot for this problem but not able to find an appropriate solution.Does above tag support in iOS ? if not then what is the solution to browse and upload the file in iOS?

like image 368
V-Xtreme Avatar asked Oct 11 '12 06:10

V-Xtreme


People also ask

How does HTML input type file work?

A file input's value attribute contains a string that represents the path to the selected file(s). If no file is selected yet, the value is an empty string ( "" ). When the user selected multiple files, the value represents the first file in the list of files they selected.

What is the file input?

Definitions of input file. (computer science) a computer file that contains data that serve as input to a device or program. synonyms: input data. type of: computer file. (computer science) a file maintained in computer-readable form.


1 Answers

Arbitrary file upload is not supported on iOS. The tag used to be ignored up to (and including) iOS 5.x.

Starting with iOS 6, this tag allows the user to add a photo from the photo stream or the camera ("take new photo"). All of this will be handled behind the scenes by the browser and the user will never see a real low-level "choose file" dialog.

like image 72
Ingo Avatar answered Sep 27 '22 21:09

Ingo