Is there any way to use <input type="file"> in Safari on iPhone/iPod Touch? Or is there something similar that I can use inside the browser? I want to upload a photo from the device to my database using the browser.
This is possible with iOs 6 or greater (http://www.apple.com/ios/whats-new/#safari). The browser renders
<input type="file">
and clicking on "Choose File" prompts the user to take a new photo or choose existing from the photo library.
Can't be done with plain XHTML/javascript as Safari does not support uploads. See this previous question for a potential workaround solution to upload photos.
I had the same problem today. The alternative browser iCab Mobile does support file uploads. I got it for my iPad and (at least for me) file upload works fine.
Related
I was able to upload images present in my imagegallery using the phonegap application.
I want to know whether it will be possible for me to upload a pdf from the iphone application. Either using phonegap OR any native technologies.
Have you tried to add a <input type="file"> field and send the form against a script where you can work with it?
Perhaps this will lend you in the right way.
Can we access the iOS camera roll using the Safari's file chooser i.e. <input type="file">? According to this question, we cannot access the camera.
No, you can't. Safari doesn't support file uploading. You can, however, purchase and install iCab, which does.
Is there a API or way for accessing the the iPhone's camera from Mobile Safari?I want to create a application that can read barcode within the browser.
Thanks in advance.
It's now supported in iOS 6. I believe it uses a regular form file input field.
You can see some explanation here.
Try using input tag <input type="file" name="image" accept="image/*" capture/>.
It works well as compared to getUserMedia method which is fully supported by Opera mobile and chrome higher versions.
Hope it help.
No. There's no way to do that. No web page can access internal devices.
You can do however a small tiny app that its launched via mobile safari link and makes user select the barcode image and then redirect to a web page that will process (the small app will also upload). Like what THIS guys actually implemented (the link provides code).
If you doesn't have experience with Objective C and Cocoa Touch you can create that app via PhoneGap like if you were creating a Web Page.
UPDATE
From iOS 6 and so on you actually can as the official specs says, you can use it via the upload API as seen here.
I was find around 1 week.help me pls TvT
Granted we're WAAAAAAY past the relevance of this post, but it's nice to know that iOS6 does allow <input type="file" /> and will allow you to select files from your camera roll.
iPhone Safari doesn't support file uploads.
This is because iOS doesn't really have the concept of a file, at the user interface level. It is an inherent limitation of the UI that there isn't a user-facing filesystem through which files may be manually exchanged between apps.
You would have to persuade the user to install a custom app to do it. (existing examples)
Agreed iOS 6.X solved this issue here you will find code, screenshots and tech limitations i.e: limitations (i.e> no audio files support, no live streaming video support)
iOS 6 New Features (supporting input type file)
In my app i have shown pdf from the remote server using webview and i have to add a action to download the pdf and save it into iPhone how to do...Using Php i tried to force download pdf,which works in browser(desktop) not in device
Can any one help me...
The (unjailbroken) iPhone's Safari cannot access the local file system, so it's impossible to download anything.
(The iPad, OTOH, may support it.)
use the download attribute in slide your a tag
<a href="content/file.pdf" download > pdf link </a>
<a href="content/file.doc" download > doc link </a>