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.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Sets input to JPEG data from the container value.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
data | The container value with the data to upload. | ||
Offset | The offset where to start within container. | 0 | Optional |
Length | Size of data to take from the container. Length of container data must be ≥ Length + Offset. |
1024*1024*10 | Optional |
Returns "OK" on success.
Upload a JPEG file to a FTP Server:
Set Variable [$curl; Value:MBS("CURL.New")]
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "ftp://test.test/test/hello.jpg")]
Set Variable [$result; Value:MBS("CURL.SetOptionUpload"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password)]
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; CURL Test::Name)]
Set Variable [$result; Value:MBS("CURL.SetInputJPEG"; $curl; CURL Test::MyImage)]
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Send a JPEG via POST request:
Set Variable [$result; Value: MBS("CURL.SetOptionPost"; $curl; 1)]
Set Variable [$result; Value: MBS("CURL.SetInputJPEG”; $curl; MyTable::Image )]
Set Variable [$result; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: image/jpeg” )]
This function checks for a license.
Created 18th August 2014, last changed 31st January 2023