Skip to content
MyAppBuilder
StableGuide

Dynamic images and files

Pictures and files that belong to records — a product photo, a job's before/after shots, a signed PDF — are not library assets. They are stored in image and file fields of your entities, uploaded by your users through forms, and displayed by binding an Image, Gallery or Cards com

Dynamic images and files

Pictures and files that belong to records — a product photo, a job's before/after shots, a signed PDF — are not library assets. They are stored in image and file fields of your entities, uploaded by your users through forms, and displayed by binding an Image, Gallery or Cards component to the field.

When to use

  • Product catalogues, team directories, portfolio items where each record has its own picture.
  • Photos and documents uploaded by customers or staff while using the app.
  • Any image that changes per row.

Use the Assets library instead for the app's own design files (Assets overview).

Step 1 — add an image or file field

In Data, open the entity and add a field of type Image (pictures) or File (any file). Multiple files per record are supported by the upload inputs' Allow multiple option. Many catalog entities already have one (Photo, Image, Customer Signature).

Step 2 — let people upload

  1. Add a Form that saves to the entity.
  2. Drag an Image Upload (pictures), File Upload (documents; set Accepted types such as .pdf,image/*) or Camera (takes a photo on phones) input into the form, with the input's name set to the field key.
  3. Set Max size (MB) (default 10; server maximum 15 MB) and Allow multiple if needed.
  4. The file uploads as soon as it is chosen, and the field receives the file's URL; submitting the form saves it with the record.

Who may upload: signed-in users always; visitors who are not signed in only when the Public role has a Create rule on some entity (public forms). Files are checked for real type and size on the server, and SVGs are sanitised. Uploaded files are private: the app shows them only to users who can read the record they belong to, through links that expire after an hour or two. A copied link stops working, so share a file by sharing the record, not the link.

Step 3 — display the images

  • Image component: set Source to Dynamic value and bind Image URL to the field (Record › Photo). Inside a Repeater, Cards or on a detail page, the record in scope provides the value.
  • Gallery: bind its data to the entity and choose the Image field (image, URL or file fields are accepted) and an optional Caption field.
  • Cards: choose the Image field for the card picture.
  • Avatar: bind Image URL to a photo field for people.
  • Set Alt text from a record field (for example the product name) for accessibility.
Example
Products (entity)   Name · Price · Photo (Image)
Cards on /products  Data: Products · Image field: Photo · Title field: Name
Image on /products/:id  Source: Dynamic value · Image URL: Record › Photo · Alt: Record › Name

Uploading and downloading with actions

  • Upload file action (on a button): opens the file chooser, uploads the file and saves its URL as a result (Save URL as result, e.g. file). Follow it with Update record to store Result › file in a field.
  • Download file action: offers a file for download; bind File URL to the record's file field and give it a File name.

Permissions

User files follow the record: a customer who cannot read a job cannot see its photos through the app, and record-level rules apply to galleries and detail views like any other data. The file URL itself is not secret, so do not paste it where unintended visitors can find it.

Common mistakes

  • Binding an Image to an asset picker instead of the field. Source must be Dynamic value for record images.
  • Input name not matching the field key. The URL is not saved; check the key in the entity's fields.
  • Expecting files in the Assets library. User uploads are listed on the record, not in Assets.
  • Uploading in the builder canvas. Inputs are disabled while editing; use Preview.

Advanced

App uploads go to POST /api/runtime/:projectId/files?channel= (multipart file), limited to 15 MB, rate-limited (60 per 10 minutes signed in, 15 anonymous), sniffed and stored under <workspace>/<project>/files/<env>/<id>/<name> with a row in app_files; the response { id, url, name, size, mimeType } returns a signed preview URL; the field stores the stable unsigned URL (signatures are stripped on write) and records returned to permitted readers carry a fresh signature valid for 1–2 hours. /api/files answers 404 to unsigned requests for these files. Anonymous uploads require a role_public rule with create.

Related

Was this helpful?