curl-users
Re: Setting the Content-type on an uploaded in CURL + PHP
Date: Fri, 31 Aug 2007 08:56:12 +0200 (CEST)
On Thu, 30 Aug 2007, Bensan Benny wrote:
> This was a question that was asked several times but I have yet to find the
> answer. I am using libcurl along with PHP to upload two files along with
> various other data. Here's my code:
For PHP/CURL usage, I would recommend the curl-and-php mailing list instead,
where other PHP/CURL users hang out.
> When the two files are uploaded file2.xml has a type of
> 'application/octet-stream'. I would like that file to have a content type of
> 'text/xml'. I know that there is a way to change the content-type of an
> uploaded file in native cURL so I would imagine there is a way to do this in
> PHP's libcurl as well. How do we do this?
Multipart formpost is one of the few areas where the PHP/CURL authors decided
to go their own way instead of using a thin layer on top of libcurl's API, so
therefore I don't know how this is done...
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-08-31