On this page
Upload files with a record
Create and update records with nested file fields.
Frontbacked lets theme code put File or Blob values directly inside post data. Frontbacked finds them anywhere in the post object, uploads them with a resumable flow, and saves normal file metadata back into the post.
Use the same API for files, images, PDFs, audio, videos, and nested file arrays. You do not need a separate upload endpoint in your theme.
Re-selecting saved files
When updating a post, Frontbacked checks whether each selected file has exactly the same content as the file already saved in that field. Identical content reuses the saved attachment, including a renamed copy, without uploading it again or repeating video processing. Other post edits are still saved normally.
Use the existing updatePost({ id, type, post }) call or your usual FQL form binding. This works with images, videos, documents, audio, archives, nested file fields, and arrays; no extra method or option is needed. Different content uploads normally, even when its filename and size match. A video whose processing failed can be uploaded again to retry.
New uploads save a SHA-256 content hash. When a file is selected again, Frontbacked hashes it locally in small chunks and compares it with the saved hash. Frontbacked checks the selected bytes first, then checks any automatically resized or converted image. Both the exact saved image and the original source image can therefore be reused. Changing image preservation or preparation settings can therefore create a different attachment. The comparison also checks the file type and does not download the saved original. If a saved hash is unavailable, Frontbacked continues with the normal upload. Existing upload recovery and live processing feedback still apply to replacements.
Re-selecting files to resume
Frontbacked shows Checking file… with a percentage while checking a selected file before uploading or verifying a re-selected file for recovery. This percentage measures the file check; it does not change the percentage already uploaded. Existing upload progress callbacks also receive this feedback with phase: "checking", status: "checking", percent, and a ready-to-display message.
Uploads record a content hash before transferring file parts. When recovery asks for a file, select the original or an identical renamed copy. Frontbacked verifies its full content before sending more bytes, so a different file is rejected even if its name and size match.
For an automatically prepared image, select the original image again; Frontbacked recreates the saved preparation and verifies those bytes. Confirmed parts stay uploaded, and recovery continues from the remaining parts. Existing upload methods, the optional recovery panel, and the details dialog all use the same verification without polling or new options.
If browser storage could not retain the original save, the details dialog offers Save attachment for a completed individual file field. This attaches the uploaded file without selecting or transferring it again. Other unsaved form edits are not recovered. Nested or repeated file fields still require the original save context.
Upload a Post with Files
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
createPost and updatePost scan nested objects and arrays, so all of these work:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Update a Post with Files
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
When a post has files, the post data is still sent as JSON. Frontbacked uploads each file separately before attaching the final file metadata to the post.
Continue with Show upload progress.