How to upload a pdf from iphone using phonegap? - iphone

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.

Related

Is it possible for a web based app to retrive images from an iphone?

I'm creating a website which I would like to be supported on the iphone as well. The site allows users to upload images and manipulate them. On a desktop the user will simply click the upload button to select the file from their computer and upload it to the site. But this will fail on an iphone.
Is there any way for a pure web app which is using php/mysql/js and runs inside the browser to get images from a user's camera roll? Does Apple offer any APIs to make this possible?
No, it's not possible currently - but apparently iOS 6 is going to support image and video uploads from MobileSafari.
(Apart from that, you can ask your users if their device is jailbroken and id so, suggest them downloading Safari Upload Enabler from Cydia).

How to access the iPhone's camera from Mobile Safari

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.

Best option for online photo gallery used by iPhone app

I am going to make an iPhone and Android application.
The application requires a couple of photos uploaded.
Could you please suggest me that are there any services in which I can upload photographs and can get their URL and photographs from webservice or xml in iPhone?
Thanks,
I don't know what you're trying to do, but I think flickr, facebook, etc. have this kind of functionality.

iPhone File Upload with HTML

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.

Integrating Codeigniter and Objective C

I'm currently building a social networking site using the codeIgniter PHP framework. One of our major focuses of this site is to be able to upload images through the use of smartphones. We were focusing on building for the iPhone, but the iPhone doesn't let you upload files for some reason beyond me. I have been looking through solutions for days seeing if we could somehow integrate an iPhone app and have come up with nothing. The only thing I have found is using Cocoa Xcode in Objective C to somehow get around the fact. Now I don't know anything about objective C and I was wondering if I could somehow integrate a snippet of objective C into my PHP to allow users to upload photos off their iPhone and onto our site.
Is this possible? If so how? If not, does anyone know another work around?
You can avoid having to code an iPhone app by allowing images to be submitted by email. This is one of the ways Posterous works. I'm pretty sure that there's no other way to access the photo library outside of building your own app in Objective-C.
It seems that you would actually have to create an iPhone application doing the job for you. Check this article on how such application would be done in Objective C on the iPhone.
As an alternative, you could try third party tools like e.g. Image Upload
If I have understood ur problem, u are finding a way in what manner u should send the image with ur request to ur php.
If this is ur problem, the I suggest u to first convert the image into Base64Encoded data and send it with ur request. Now php do have inbuilt methods to convert this data to an image.
Try looking for Base64Encoding help for php.
Thanks,
Madhup
This is the very reason why social platforms have their Apps on the App Store and not just simply the Wap Sites. So either you can have email attachments, or write an app which uploads the images, and a controller which manages those uploads.