Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Container.GetDataURL

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

Component Version macOS Windows Linux Server iOS SDK
Container 1.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
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.
Performs base64 encoding and puts the data type in front of the output.
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

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 22nd February 2024


Container.GetCount - Container.GetHeight