Upload text and image to server?

Hi
I am in the making of an tab bar app, where there Is some kind of an contact formel where yo have to fill the following out: a title and text plus the opportunity to upload a picture with the text. Would It be possible with Corona to upload this information, the user puts into the Formel to a server? If yes would you please help mé to accomplish this? Guide mé in the right direction.

Thank you very much in advance :slight_smile: [import]uid: 36366 topic_id: 31644 reply_id: 331644[/import]

You will use the network.request() API to POST your form. There are parmeters and headers that will need to be sent via that API call to some web script written in PHP or some other server language that would process the from.

You will need to use Google and look for “script to upload image to web server” or similar and learn from that. It will probably show you how to do it with an HTML form but those form fields will be Lua variables that you will pass to network.request() [import]uid: 19626 topic_id: 31644 reply_id: 126393[/import]

Hi

Thank you for your response.
Can I use one of these codes from the code exchange to send a “contact” form, with title, description and a picture to my server and would it be smart related to memory usage?
http://developer.coronalabs.com/code/how-upload-image-server-multipartform-data
http://developer.coronalabs.com/code/upload-binary-corona-php-script

Thank you in advance :slight_smile: [import]uid: 36366 topic_id: 31644 reply_id: 126496[/import]

You will use the network.request() API to POST your form. There are parmeters and headers that will need to be sent via that API call to some web script written in PHP or some other server language that would process the from.

You will need to use Google and look for “script to upload image to web server” or similar and learn from that. It will probably show you how to do it with an HTML form but those form fields will be Lua variables that you will pass to network.request() [import]uid: 19626 topic_id: 31644 reply_id: 126393[/import]

Hi

Thank you for your response.
Can I use one of these codes from the code exchange to send a “contact” form, with title, description and a picture to my server and would it be smart related to memory usage?
http://developer.coronalabs.com/code/how-upload-image-server-multipartform-data
http://developer.coronalabs.com/code/upload-binary-corona-php-script

Thank you in advance :slight_smile: [import]uid: 36366 topic_id: 31644 reply_id: 126496[/import]