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?
Add a comment
|
1 Answer
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.
-
if i am using iOS 5 then what is the solution for this problem ?– V-XtremeCommented Oct 11, 2012 at 6:35
-
1
-
2@V-Xtreme: Do you really think Apple guys "forgot" to add a filesystem and "forgot" to add a way to manage file upload/download? Those are deliberate decisions... they just don't want you to be able to do that.– 6502Commented Oct 11, 2012 at 6:41
-
Then nothing can be done to upload file from local iOS device ? One thing if i use button there instead of <input type="file"> .Then on button click can I browse through the files using javascript. same as UIImagePickerControllerSourceTypePhotoLibrary in objective c.– V-XtremeCommented Oct 11, 2012 at 6:43
-
@V-Xtreme Have you ever seen a file browser dialog on iOS? In any app? How do you even define "file" in iOS?– deceze ♦Commented Oct 11, 2012 at 6:46