Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4    Statistic    FMM    Blog  


Set preferred upload buffer size.

Component Version macOS Windows Linux Server iOS SDK
CURL 8.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionUploadBufferSize"; curl; Value )   More


Parameter Description Example
curl The CURL session handle. $curl
Value The new buffer size.


Returns OK or error.


Set preferred upload buffer size.
Pass an integer specifying your preferred size (in bytes) for the upload buffer in libcurl. It makes libcurl uses a larger buffer that gets passed to the next layer in the stack to get sent off. In some setups and for some protocols, there's a huge performance benefit of having a larger upload buffer.

This is just treated as a request, not an order. You cannot be guaranteed to actually get the given size.

The upload buffer size is by default 64 kilobytes. The maximum buffer size allowed to be set is 2 megabytes. The minimum buffer size allowed to be set is 16 kilobytes.

Since curl 7.61.1 the upload buffer is allocated on-demand - so if the handle isn't used for upload, this buffer will not be allocated at all.

For slow upload/downloads, it may be better to set buffer size to 1 MB with CURL.SetOptionUploadBufferSize or CURL.SetOptionBufferSize properties to make transfers faster.

See also UPLOAD_BUFFERSIZE option in CURL manual.

See also

Release notes

Blog Entries

Created 31st October 2018, last changed 3th October 2019

CURL.SetOptionUpload - CURL.SetOptionUseSSL

Feedback: Report problem or ask question.

Start Chat