On Mon, 17 Aug 2009, Rahul Rathi wrote:

I am trying to POST huge files on a server. The server does not allow to do
PUT for this.

I tried using curl_formadd() for doing this. But the problem with this is it inserts MIME headers and boundaries even if a single file is POSted. Is there any of avoiding these MIME headers.

The CURL_POSTFIELDS aceepts a buffer for bindary data. But this is ok for small buffers. When it comes to writing huge files this not useful.

Is there any way to POST huge files ? I don't want to do PUT.

curl_formadd() creates a multipart formpost and juding by your comments above that's not what you want (as that implies mime headers etc).

And yes, a normal POST can be any size you like. You can use CURLOPT_POSTFIELDS or even set CURLOPT_POST only and pass all data using the read callback.

--

 / daniel.haxx.se

Reply via email to