On this page
Uploads and posts reference
Manage uploads and create, update or delete records.
Method signatures
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Before you begin: Video reference.
Upload Helpers
Frontbacked.uploads.status(sessionId?) returns current upload progress, including feedback restored when a post is read after refresh. A .live post or list binding updates that feedback without polling.
Frontbacked.uploads.pending(post) returns unfinished uploads found in a post object or post id, including replacements restored from post.uploads or a file's upload.replacement metadata. Upload feedback is available only to its uploader and follows the post's read permissions.
Uploads started through createPost, uploadPost, and updatePost automatically resume after refresh when their remaining bytes are available in browser storage. Frontbacked finishes the original save and releases confirmed local chunks as the upload progresses. When the full file cannot fit, it saves the remaining parts once they can fit. Existing onUploadProgress callbacks receive recoveryReady and recoveryMessage to describe refresh recovery.
Frontbacked.uploads.resume({ post, files?, onFile?, onProgress? }) resumes interrupted uploads when automatic recovery is unavailable. When no matching file is supplied, Frontbacked shows a resume modal that asks the user to choose the original file.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Use the Upload File guide for progress fields, limits, and resume examples.
Frontbacked.uploads.resumePost(input) retries the saved post operation after files resume. Pass an id to update an existing post; omit id to create a post.
Frontbacked.uploads.clearCompleted() removes completed upload progress entries from the current page session.
Post Helpers
Frontbacked.createPost({ type, post }) creates a post.
| Option | Required | Purpose |
|---|---|---|
type | yes | FRL post type, such as products. |
post | yes | Post data to validate and store. |
If post contains File or Blob values at any depth, Frontbacked uploads each file with a resumable flow and stores file metadata in the post. The post body itself is sent as JSON.
Post IDs are generated by Frontbacked. Theme code can use the exact string "$id" as a normal field value on create when that field should store the generated post ID.
Frontbacked.updatePost({ id, type, post, merge }) updates an existing post. id and post are required. merge defaults to true; when true, Frontbacked can merge submitted fields with the stored post before validation.
Frontbacked.deletePost({ id }) deletes a post after Frontbacked checks the post type's delete rule.
Frontbacked.uploadPost(...) remains available as a compatibility alias for Frontbacked.createPost(...).
Continue with Storage reference.