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


Adds file to the file list for preview.

Component Version macOS Windows Linux Server iOS SDK
QuickLook 4.3 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "QLPreviewPanel.AddFile"; Path )   More


Parameter Description Example
Path The native file path to the image file. "/Users/test/Images/test.jpg"


Returns Ok or error.


Adds file to the file list for preview.
If you want the user to select a path, please use FileDialog functions.

A QLPreviewController can display previews for many common file types, including the following:

  • iWork documents
  • Microsoft Office documents
  • Rich text format, or RTF, documents
  • PDF files
  • Images
  • Text files with a uniform type identifier that conforms to the public.text type. To learn more, see Uniform type identifiers.
  • Comma-separated values, or CSV, files
  • 3D models in the USDZ format with both standalone and AR views for viewing the model

The list of supported common file types may change between operating system releases. In addition, you can enable previews for your own file types by implementing your own preview extension.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.

See also

Example Databases

This function checks for a license.

Created 18th August 2014, last changed 29th June 2023

QLPreviewPanel.AddContainer - QLPreviewPanel.AddImage