Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CURL.SetOptionMaxFileSize

Sets the maximum file size for download.

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

(old name: CURL.SetOptionMaxFileSizeLarge)

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Value The new maximum file size. 1000000

Result

Returns "OK" on success.

Description

Sets the maximum file size for download.
Pass a number as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.

The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.

See also MAXFILESIZE option in CURL manual.

See also

Blog Entries

Created 18th August 2014, last changed 18th April 2016


CURL.SetOptionMaxConnects - CURL.SetOptionMaxLifeTimeConnection