Container fields via the Data API
ExpertUpload files to container fields and retrieve container URLs using the FileMaker Data API.
What you'll learn
- How to upload a file to a container field using the Data API
- How container field values appear in GET responses
- How to download container content using the returned URL
The FileMaker Data API supports uploading files to container fields via a multipart/form-data POST request, and returns a URL path in the fieldData of a GET response that can be used to download the container content. This enables fully scriptable document management without FileMaker Pro.
1/3
1
Uploading to a container field
POST to the /containers endpoint with a multipart/form-data body. The field parameter names the target container field.
HTTP
POST /fmi/data/v1/databases/MyDB/layouts/Documents/records/42/containers/AttachmentField/1 Authorization: Bearer <token> Content-Type: multipart/form-data; boundary=----FormBoundary ------FormBoundary Content-Disposition: form-data; name="upload"; filename="report.pdf" Content-Type: application/pdf <binary PDF data> ------FormBoundary--
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo