Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 4.0   4.1   4.2   4.3   4.4   5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0    Statistic  

CURL.SetOptionUpload

Sets this transfer to be an upload.

Component: CURL
Version: 2.5
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "CURL.SetOptionUpload"; Handle; Value )

Parameters

Parameter Description Example value
Handle 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.

Examples

Set CURL session to be upload:

MBS( "CURL.SetOptionUpload"; $curl; 1 )

See also


CURL.SetOptionUnrestrictedAuth   -   CURL.SetOptionUseSSL

Feedback: Report problem or ask question.




Links
MBS REAL studio Plugins - Pfarrgemeinde St. Arnulf Nickenich