| 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
- Version 15.5
- Improved Container.GetDataURL to recognize more types.
- Version 12.3
- Changed Container.GetDataURL function to use right mime type for WebP images.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 15.5pr6
- MBS FileMaker Plugin, version 12.3pr1
- MBS Filemaker Plugin, version 3.0pr3
This function checks for a license.
Created 18th August 2014, last changed 22nd February 2024