File Upload and Download via the Data API
BeginnerUpload binary files into FileMaker container fields and download container content using the Data API, including streaming large files.
What you'll learn
- How to upload a file to a container field with multipart/form-data
- How container field values appear in GET responses
- How to download container content using the provided URL
- How to handle large files without loading them fully into memory
Container fields store binary data -- images, PDFs, audio files. The Data API provides a dedicated upload endpoint that accepts multipart/form-data, and container field values in GET responses include a URL you can use to fetch the binary content. Understanding both directions prevents the common mistake of trying to base64-encode files in JSON.
1/4
1
Uploading a file to a container field
Use a POST to the container upload endpoint with Content-Type: multipart/form-data. The form field must be named "upload". The record must already exist -- create it first, then upload.
HTTP
// Upload a PDF to the "Document" container field on record 14 POST /fmi/data/v1/databases/Projects/layouts/Documents/records/14/containers/Document/1 Content-Type: multipart/form-data; boundary=----Boundary ------Boundary Content-Disposition: form-data; name="upload"; filename="contract.pdf" Content-Type: application/pdf <binary PDF data> ------Boundary--
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo