Skip to content
MyAppBuilder
StableGuide

Upload photos

Goal: technicians photograph a job on site; the photos are stored with the job record and shown in a gallery for the office and the customer.

Upload photos

Goal: technicians photograph a job on site; the photos are stored with the job record and shown in a gallery for the office and the customer.

Data needed

  • A Jobs entity (or any record photos belong to).
  • A Job Photos entity with an Image field Photo (required), a select Kind (Before / After) and a text Caption, plus a relation Job to Jobs. The Before/After Photos business component creates this entity and the screen for you.

Option A — the Before/After Photos component

  1. In Build, drop Before/After Photos (Service business) onto a job page.
  2. It contains an upload form (Photo, Kind, Caption) and a Gallery bound to Job Photos, using Photo as the image field and Caption as the caption.
  3. Preview the page, pick an image (or take one on a phone), submit. The gallery refreshes with the new photo.

Option B — build it yourself

  1. Drag a Form onto the page, set Saves to entity to Job Photos.
  2. Inside the form drag an Image Upload input (name photo). Set Allow multiple images if several photos per submit are wanted and the Max size (MB) (default 10). On phones, the Camera input opens the camera directly.
  3. Add a Dropdown for Kind and a Text Input for Caption.
  4. Add a Gallery component below, bind its data to Job Photos and set Image field = Photo, Caption field = Caption.
  5. On a job detail page, filter the gallery by Job equals Page parameter › id.

The upload happens as soon as the file is chosen: the file is sent to your app's file storage and the input holds the file's URL; submitting the form saves that URL in the image field.

Option C — upload from a button action

  1. On a button, add Upload file (Accepted types image/*, Save URL as result file).
  2. Add Update record → Jobs, record = Current record › id, values Cover Photo = Result › file.
  3. Add Show message "Photo saved".

Resulting behaviour

  • Files are checked on the server: real type detected from the content (not the file name), 15 MB maximum per file for app uploads, SVGs cleaned of scripts.
  • Signed-in users can upload. Visitors who are not signed in can upload only if the Public role has a Create rule on some entity (public forms); otherwise they see "Please sign in to upload files."
  • The stored value is a URL under /api/files/…; the Image and Gallery components display it, and Download file can offer it for download.
Example
Job Photos record
  photo:    /api/files/ws_…/proj_…/files/live/file_01h…/site-before.jpg
  kind:     before
  caption:  Kitchen before demolition

Variations

  • Signature or location: the Signature input stores a drawn signature as an image the same way; Location captures GPS coordinates.
  • Limit who sees the photos: give the Customer role a record-level rule on Job Photos (Customer Email equals Current user › email) so customers only see photos of their own jobs.
  • Office uploads in bulk: the Assets library is for your app's own media (logos, backgrounds), not for customer data; keep job photos in records.

Common mistakes

  • Using an Image component with Source = Uploaded asset for job photos. Assets are design files; record photos need Dynamic value bound to the image field (see Dynamic images).
  • A file over the limit or of an unsupported type: the input shows the server's message ("Files must be under 15 MB", "This file type is not allowed").
  • Testing uploads on the editor canvas: inputs are disabled there; use Preview.

Related

Was this helpful?