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:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
CURL.SetOptionUpload
Sets this transfer to be an upload.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
CURL
|
2.5 |
✅ Yes
|
✅ Yes
|
✅ Yes
|
✅ Yes
|
✅ Yes
|
MBS( "CURL.SetOptionUpload"; curl; Value )
More
MBS(
"CURL.SetOptionUpload"; /* Sets this transfer to be an upload. */
$curl; /* The CURL session handle. */
$Value) /* Whether to do an upload.e.g. 1 */
Less
Parameters
Parameter |
Description |
Example |
curl |
The CURL session handle. |
$curl |
Value |
Whether to do an upload. |
1 |
Result
Returns "OK" on success.
Description
Sets this transfer to be an upload.
A parameter set to 1 tells the library to prepare for an upload. With the CURL.SetInput functions you can define the upload data. If the protocol is HTTP, uploading means using the PUT request unless you tell curl otherwise.
Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with CURL.SetOptionHTTPHeader as usual.
If you use PUT to a HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURL.SetOptionHTTPHeader. With HTTP 1.0 or without chunked transfer, you must specify the size.
See also CURL.SetOptionPost.
See also UPLOAD option in CURL manual.
Examples
Set CURL session to be upload:
MBS( "CURL.SetOptionUpload"; $curl; 1 )
See also
Release notes
Example Databases
Blog Entries
Created 18th August 2014, last changed 24th February 2016
CURL.SetOptionUpkeepIntervalMS
-
CURL.SetOptionUploadBufferSize
Feedback: Report problem or ask question.