views:

64

answers:

3

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?

+1  A: 

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

Till
So I'd have to learn to build an iPhone application just to upload a file. Apple is the bane of my existence.
Mike
Your lack of skill as a programmer would probably hindering your existence more than Apple in this case.
Azeem.Butt
Unnecessary. Go flame somewhere else.
Mike
A: 

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

Madhup
The uploading of the image works fine. It's just that on iPhones, the input type="file" is disabled. That's my issue.
Mike
+1  A: 

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.

nevan
Nevan is right, it is VERY common to use the email-function for uploading images - however there are upload-clients available - at least one of those I found does actually permit to adjust the upload parameters (URL,...).
Till