Image uploading with network 2.0

I’m trying to upload an image while passing along some additional POST data. My old code using a multipart form with network.request works as expected on previous builds but not with network 2.0.

The network.upload convenience method doesn’t seem to provide a way to pass custom data along with the image. Any advice or examples for about how I might go about this? Thanks in advance. [import]uid: 87138 topic_id: 37263 reply_id: 67263[/import]

You could add some values to the url, e.g. http://yourserver.com/upload.php?originalFilename=picture.jpg&userid=13434455

 

This will be available like $_GET[“originalFilename”] and $_GET[“userid”], while your image resides in the raw post data.

You could add some values to the url, e.g. http://yourserver.com/upload.php?originalFilename=picture.jpg&userid=13434455

 

This will be available like $_GET[“originalFilename”] and $_GET[“userid”], while your image resides in the raw post data.

Hi Kyle,

Did you ever get multipart form’s working with network 2.0, and if so were any code changes to your handling multipart form request necessary?

Thanks, 

David

Hi Kyle,

Did you ever get multipart form’s working with network 2.0, and if so were any code changes to your handling multipart form request necessary?

Thanks, 

David

i’m tryng to put an image on my server with network.upload, but i can’t understand where should i put the name for my file (i did not mean the file name) to pickup on the php side.

like

$imagename = $\_FILES["Whatthehellimsupposetoputhere"]["name"];  

i’m tryng to put an image on my server with network.upload, but i can’t understand where should i put the name for my file (i did not mean the file name) to pickup on the php side.

like

$imagename = $\_FILES["Whatthehellimsupposetoputhere"]["name"];  

Anyone have an answer for this?

Anyone have an answer for this?