Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.GetResultAsPNG
Returns the result of the transaction as PNG image.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
Filename | The desired file name. | test.png | Optional |
Result
The result value which you can assign to a container field.
Description
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.
Examples
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; "https://www.monkeybreadsoftware.com/filemaker/images/devcon_14_banner_horz.png")]
# 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.GetDebugMessages"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Release"; $curl)]
See also
- CURL.GetDebugMessages
- CURL.GetResultAsContainer
- CURL.GetResultAsData
- CURL.GetResultAsEmail
- CURL.GetResultAsGIF
- CURL.GetResultAsPDF
- CURL.GetResultAsText
- CURL.New
- CURL.Release
- CURL.SetOptionURL
Release notes
- Version 15.1
- Improved CURL.GetResultAsGIF, CURL.GetResultAsJPEG, CURL.GetResultAsPDF and CURL.GetResultAsPNG to return empty if the data is not the expected type.
Blog Entries
- MBS FileMaker Plugin, version 15.1pr1
- Translating Insert from URL options for CURL to MBS Plugin calls
This function checks for a license.
Created 18th August 2014, last changed 19th April 2020
