Can I upload a photo to a website with this sdk?

I want to develop an app that will allow users to take a photo and then upload it to my website with some additional info (name, description, etc).

Is this possible with this SDK? If so is there any sample code to help me out through the tutorials or what anyone else has made?

Thanks!

.: Adam [import]uid: 5270 topic_id: 537 reply_id: 300537[/import]

Adam

you can do that with the current sdk, look into luasockets. we support http but is not very well documented on purpose. we are trying to make the http api much more robust.

we will get some sample code to do this in the future. I can get you some code in a few days

carlos [import]uid: 24 topic_id: 537 reply_id: 1048[/import]

Awesome!

Looking forward to it =)

.: Adam [import]uid: 5270 topic_id: 537 reply_id: 1060[/import]

Just getting started developing…

I would like to have that sample code as well. [import]uid: 4527 topic_id: 537 reply_id: 1301[/import]

if they do not resolve camera problem (the application crashes both in SDK environment and on iPhone) we can not discuss about how to transfer image from iphone to web server :slight_smile:
About transfer they exist a few solution as web popup with form tag and “file” input tag (and php server) or lua ftp socket .


Add on 22 March

I checked the possibility to transfer by using the tag “form” and type input “file”: it is not possible.
Both because iPhone browser does not accept “Choose file” and because it is not possible to set value in type input “file”.
[import]uid: 2735 topic_id: 537 reply_id: 1302[/import]

Did anyone ever figure out how to do this? Any help/code would be greatly appreciated! Thanks! [import]uid: 2773 topic_id: 537 reply_id: 6382[/import]

Yep. use Titamium (appcelerator.com). I’ve already built 4 apps that are in the app store since i first posted this.

psyance [import]uid: 5270 topic_id: 537 reply_id: 6386[/import]

anything on POST uploads, using input stream for big images/files, is it posible? [import]uid: 48356 topic_id: 537 reply_id: 29843[/import]

+1 from me

wanted this for network.request (ie async http request)
http://developer.anscamobile.com/forum/2011/03/27/anyone-have-example-multipartform-networkrequest

and also for facebook.request
http://developer.anscamobile.com/forum/2011/03/23/binary-mime-attachment-facebookrequest

i’ve only currently had it working with smtp.send
http://developer.anscamobile.com/forum/2011/01/31/uploading-binary-file-http#comment-19806
[import]uid: 6645 topic_id: 537 reply_id: 29882[/import]

Hi Carlos,

Are examples of a POST image upload using luasockets still coming? I’m not comfortable using the ftp to transfer images to a server and have not had any luck uploading any images via a POST.

Thanks!
[import]uid: 13298 topic_id: 537 reply_id: 34329[/import]

I’d like to know how to do this, too! Especially to facebook!

Thanks guys!
[import]uid: 13784 topic_id: 537 reply_id: 49036[/import]