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:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Opens file for reading data needed for upload, email sending or HTTP Post.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
Path | Native file path. | "C:\Documents\Test.Txt" | |
Offset | Available in MBS FileMaker Plugin 8.4 or newer. Offset where to start reading relative to file start. |
1024*1024 | Optional |
Length | Available in MBS FileMaker Plugin 8.4 or newer. Size of data to read from file. |
1024*1024*10 | Optional |
Returns "OK" on success or error message.
Set input from file on disk:
Set Variable [ $result ; Value: MBS( "CURL.OpenInputFile"; $curl; "/Users/cs/Desktop/test.zip" ) ]
Upload file via FTP:
Set Variable [$curl; Value:MBS("CURL.New")]
# FTP URL with destination file name:
Set Variable [$result; Value: MBS("CURL.SetOptionURL" ; $curl ; "ftp://12.34.56.78/AZ1677ZZ.jpg")]
Set Variable [$result; Value: MBS("CURL.SetOptionUpload" ; $curl ; 1)]
Set Variable [$result; Value: MBS("CURL.SetOptionPassword" ; $curl ; "xxx" )]
Set Variable [$result; Value: MBS("CURL.SetOptionUserName" ; $curl ; "yyy" )]
# Pick file from desktop:
Set Variable [$Desktop; Value: MBS("Folders.UserDesktop")]
Set Variable [$Path; Value: MBS("Path.AddPathComponent"; $desktop; "AZ1677ZZ.jpg")]
Set Variable [$result; Value: MBS( "CURL.OpenInputFile" ; $curl ;$path )]
# Pick file from container:
// Set Variable [$result; Value: MBS( "CURL.SetInputFile" ; $curl ; Test::ImageFileContainer )]
# Upload file
Set Field [Test::PerformResult; MBS( "CURL.Perform" ; $curl )]
Set Field [Test::DebugMessages; MBS( "CURL.GetDebugAsText" ; $curl)]
Set Variable [$result; Value:MBS( "CURL.Release" ; $curl )]
Created 18th August 2014, last changed 19th April 2020
CURL.NumberOfRunningTransfers - CURL.Perform
Feedback: Report problem or ask question.