Php code to Corona code : please help

Hi,

I do not know  php and despite investigating and trying some trial and errors,  did not find the proper Corona recipe to make this work. Basically I am trying to convert this code into a network.request - “post”  code.

Would anybody give me a cue of where to look (especially the POSTFIELDS area?

Here is the code I am trying to convert :

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,   “myUploadurlhere…” );

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );

curl_setopt($ch, CURLOPT_POST,           1 );

curl_setopt($ch, CURLOPT_POSTFIELDS,     file_get_contents(“puppy.jpg”)); 

$result=curl_exec ($ch);

Thanks a lot

Nick

I have found the solution. i was using network.request instead of using network.upload.

I have found the solution. i was using network.request instead of using network.upload.