Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Returns the result of the transaction as PNG image.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes
MBS( "CURL.GetResultAsPNG"; curl { ; Filename } )   More


Parameter Description Example value
curl The CURL session handle. $curl
Filename Optional
The desired file name.


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


Returns the result of the transaction as PNG image.
Make sure the data is a PNG. The plugin does not verify whether result is a PNG file. But if it is one, it sets size properties and creates a preview JPEG 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.


Load a PNG file from URL into container:

# start new transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# set URL
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "")]
# run transfer
Set Variable [$ErrorCode; Value:MBS("CURL.Perform"; $curl)]
# get result as PNG for field and debug messages:
Set Variable [$Result; Value:MBS( "CURL.GetResultAsPNG"; $curl)]
Set Field [test::MyContainerField; $Result]
Set Variable [$DebugMessages; Value:MBS( "CURL.GetDebugAsText"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Cleanup"; $curl)]

See also

Created 18th August 2014, last changed 4th February 2016

CURL.GetResultAsPDF   -   CURL.GetResultAsText

Feedback: Report problem or ask question.

MBS Xojo blog