Jump to content

multipart form file send


wightolore

Recommended Posts

hello everyone i'm brand new to the forums and kinda brand new to php

 

when sending a multipart form that has a field to upload a file IN html the header reads 'POST / HTTP/1.1 (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream)' [[i think there are four '(application/octet-stream's because there are four fields for four different uploadable files]]

 

But when i attempt to send my own form with cURL I get 'POST / HTTP /1.1' and the empty file fields below are read as text only.. what should i do to have them recognized as files without actually uploading any files?

 

 

Code:

//                                          {10th field}

$postarray[urlencode('image1')] = urlencode('add');

       

//                                          {11th field}

$image1 = "";

$postarray[urlencode('imgfile1')] = @$image1;

 

 

Link to comment
https://forums.phpfreaks.com/topic/160306-multipart-form-file-send/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.