Hi,
is "Content-Length:" the other header, too`
Other header e.g:
--abc Content-Disposition: form-data; name="%s"; filename="%s" Content-Type: application/octet-stream
Viele Grüße Jan
-----Ursprüngliche Nachricht----- Von: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l-bounces@lists.wikimedia.org] Im Auftrag von Bryan Tong Minh Gesendet: Mittwoch, 21. Oktober 2009 12:25 An: Wikimedia developers Betreff: Re: [Wikitech-l] Problem with Upload API
On Wed, Oct 21, 2009 at 12:15 PM, Jan Luca jan@jans-seite.de wrote: [...]
Content-Type: multipart/form-data Content-Length: ".strlen($file)." Content-Disposition: form-data; name="".$filename.""; filename="".$filename.""
".$file." \r\n\r\n";
You do set your content-type to multipart/form-data, but your content is not actually multipart/form-data encoded. A multipart/form-data encoded request looks something like this:
POST / HTTP/1.1 Content-Type: multipart/form-data; boundary=abc
--abc Content-Disposition: form-data; name="%s"; filename="%s" Content-Type: application/octet-stream
<FILECONTENT> --abc Content-Disposition: form-data; name="%s"
data --abc Content-Disposition: form-data; name="%s"
data --abc--
Bryan
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l