CURL.SetOptionInFileSize
------------------------

Sets the file input size.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionInFileSize"; curl; Value ) 

**MBS**( **"CURL.SetOptionInFileSize";** /\* Sets the file input size. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The input size.e.g. 1234 \*/ 

(old name: CURL.SetOptionInFileLarge)

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The input size. | 1234 |

### Result

Returns "OK" on success.

### Description

Sets the file input size.  
When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a long. See also CURL.SetOptionInFileLarge.  
  
For uploading using SCP, this option is mandatory.  
  
When sending emails using SMTP, this command can be used to specify the optional SIZE parameter for the MAIL FROM command.  
This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the input data.  
Our [CURL.SetInputText](CURLSetInputText.md) and other input functions also set the file size.  
See also [INFILESIZE](https://curl.haxx.se/libcurl/c/CURLOPT_INFILESIZE.html) option in CURL manual.

### Examples

Sets size of input:

 MBS ( "CURL.SetOptionInFileSize"; $curl ; $size )  
### See also

- [CURL.SetInputText](CURLSetInputText.md)
- [CURL.SetOptionBufferSize](CURLSetOptionBufferSize.md)
- [CURL.SetOptionCookieFile](CURLSetOptionCookieFile.md)
- [CURL.SetOptionFileTime](CURLSetOptionFileTime.md)
- [CURL.SetOptionMaxFileSize](CURLSetOptionMaxFileSize.md)
- [CURL.SetOptionPostFieldSize](CURLSetOptionPostFieldSize.md)

### Blog Entries

- [MBS Filemaker Plugin, version 3.3pr1](https://www.mbsplugins.de/archive/2013-05-24/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 8th December 2016

  
[CURL.SetOptionIgnoreContentLength](CURLSetOptionIgnoreContentLength.md) - [CURL.SetOptionInterface](CURLSetOptionInterface.md)

[HTML Version](CURLSetOptionInFileSize.shtml)