cURL / Mailing Lists / curl-library / Single Mail


Re: How to upload file as CouchDB attachment via libCurl

From: Lane <>
Date: Tue, 27 May 2014 02:41:19 -0500

Oh, that's interesting. I see what you mean. I now wonder if there's a
limit for large files into this stream. I'll give it a try in the morning.

On Mon, May 26, 2014 at 8:31 PM, Jonathan C. <> wrote:

> > So that curl command works on the command line and does exactly what I
> > want. What I don’t understand is how to upload the part within
> > parenthesis, the actual file. I.e., $(openssl base64 < filename). This
> > line converts the file to base64, then curl uploads it. That's the part
> > I don't understand with the API or to build into the app to upload the
> > file as part of the json object. And yes, its a huge file.
> From what I can tell, this is not a libcurl issue in reality.
> You *just* need to get the file contents (search for c++ fstream), encode
> it to base64 (there are some functions for that out there), and place it at
> the specified position in the json string. (I don't know a fast way to do
> that, since I don't know if printf like functions are good for large
> values).
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2014-05-27