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: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

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

💬 Ask a question or report a problem