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: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  

Container.GetDataURL

Returns the complete Data url for an image stored in a container field.

Component Version macOS Windows Linux Server iOS SDK License
Container 1.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes Paid
MBS( "Container.GetDataURL"; container )   More

Parameters

Parameter Description Example
container The container field or value to inspect.

Result

Returns Container or error.

Description

Returns the complete Data url for an image stored in a container field.
This is very useful for displaying images in web pages. The function tries to make data urls from the images in the container field in the following order: Tiff, PNG, PDF, GIF, JPEG Unfortunately, FileMaker on Windows XP doesn't display image urls very well since it is based on Internet Explorer which doesn't like Image URLs.
In plugin version this also works for referenced JPEG images.

Updated in v12.3 to work fine for TIFF, PNG, BMP, GIF, JPEG and WebP.

Examples

Get URL for only PDF part and ignore JPEG/PNG previews:

MBS("Container.GetDataURL"; MBS( "Container.ExtractStream"; ContainerField; "PDF "; "test.pdf"; "PDF " ))

See also

Release notes

  • Version 12.3
    • Changed Container.GetDataURL function to use right mime type for WebP images.

Example Databases

Blog Entries

Created 18th August 2014, last changed 19th May 2022


Container.GetCount - Container.GetHeight

Feedback: Report problem or ask question.


Start Chat