ygrek / ocurl

OCaml bindings to libcurl
https://ygrek.org/p/ocurl
MIT License
59 stars 32 forks source link

Make it possible to add a name to a MIME part #40

Closed bbc2 closed 3 years ago

bbc2 commented 3 years ago

This adds a field name of type string option to curlMIMEPart. If name is Some str, the library uses curl_mime_name to give the part a name.

This enables the use of the library for uploading to S3 while avoiding the deprecated curl_form* functions.

bbc2 commented 3 years ago

The same could be done with https://curl.se/libcurl/c/curl_mime_filename.html. Let me know if you'd like me to add that as well.

ygrek commented 3 years ago

Thanks!