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.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1    Statistic    FMM    Blog  

CURL.GetResultAsJPEG

Returns the result of the transaction as JPEG image.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.GetResultAsJPEG"; curl { ; Filename } )   More

Parameters

Parameter Description Example Flags
curl The CURL session handle. $curl
Filename The desired file name. test.jpg Optional

Result

The result value which you can assign to a container field.

Description

Returns the result of the transaction as JPEG image.
Make sure the data is a JPEG. The plugin does not verify whether result is a JPEG file. But if it is one, it sets size properties so FileMaker can preview it.
Version 5.2 and later can use the filename from URL if you don't provide one yourself.

See also CURL.GetResultAsContainer.

Examples

Load JPEG from URL and store in container field:

# start new transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# set URL
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "https://monkeybreadsoftware.com/filemaker/images/devcon2013.jpg")]
# run transfer
Set Variable [$ErrorCode; Value:MBS("CURL.Perform"; $curl)]
# get result as JPG and store in field:
Set Variable [$Result; Value:MBS( "CURL.GetResultAsJPEG"; $curl)]
Set Field [test::MyContainerField; $Result]
# get debug messages:
Set Variable [$DebugMessages; Value:MBS( "CURL.GetDebugAsText"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Release"; $curl)]

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 19th April 2020


CURL.GetResultAsGIF - CURL.GetResultAsMime

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos

Start Chat