| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
file upload, Content-Type problem
From: Nicolas Rod <Nicolas.Rod_at_unige.ch>
Date: Wed, 28 Oct 2009 17:58:08 +0100
Hi,
I'm trying to simulate an HTML upload form in order to send a request to
I have to send an XML file to the service. After having tried a lot of
***********************************************************************************
With the command line, in order to make it work, I had to use the -F
curl -F file="@content.xml;type=text/xml"
(...)
<?xml version="1.0" encoding="UTF-8"?>
***********************************************************************************
$post_data = array('file' => '@/tmp/content.xml');
(...)
<?xml version="1.0" encoding="UTF-8"?>
***********************************************************************************
As you can see, the value of the Content-Type is different
curl client from a terminal :
CURL-PHP :
Is there a way to set the value of this Content-Type with CURL-PHP ?
Thanks a lot,
--------------------------------------
Université de Genève - DINF/NTICE
Tel. +41 22 379 11 19
_______________________________________________
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info