On this page
Attachments and security reference
Publish FQL pages and remove saved attachments.
Before you begin: Page functions reference.
Publishing Checklist for FQL Pages
- State bindings use stable selectors that continue to match the intended elements.
- Every rendered element has
f="true". - Lists have an
id, a first-child template, and stableidvalues or an explicitf-key. - Forms prevent duplicate submits and show a submitting state.
- File inputs store
Filevalues in state before upload/update. - Commas are used for multiple event sources,
&&is used for truthy gating, and||is used for fallbacks. - Writes have matching FRL schemas and permission rules.
- Search and filter selectors name the fields visitors should actually search or filter.
Email verification codes
Use otp.send, otp.resend, and otp.verify in FRL endpoints, then pass the returned challenge to Frontbacked.otp.show(challenge, { verify, resend }) for an accessible code-entry dialog. See Email verification codes for the complete flow.
Remove and Replace Post Attachments
These APIs are available in Frontbacked 42.2.0 and newer.
Managed uploads include a permanent id. Videos also include a permanent mediaId; keep both when copying a file into a snapshot or another record. URLs and filenames are display values, not deletion identifiers. Playback and upload-progress details are temporary and are not part of the saved identity.
To edit an array of files, submit the complete array you want to retain. For example, removing the second photo keeps the first and third:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Replace an item by putting a newly selected browser File in its place. Retain the stored metadata for unchanged items. New uploads complete before the post is saved; a failed upload does not replace the saved attachments. Reordering an array removes nothing. For a single optional field, use Frontbacked.empty.UNSET to remove it.
For an immediate attachment action, use Frontbacked.removePostFiles({ id, type?, files }):
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
files accepts 1–100 saved file objects or permanent file-ID strings. It removes every occurrence of those identities from the selected post, including nested fields and arrays, while retaining unrelated values. Missing or changed attachments return an error. The normal edit permissions, hooks and schema validation apply: a required file or minimum array size can prevent removal. Keep the form values when result.ok is false, and refresh the displayed post after success.
To combine removal with other edits in one save, use Frontbacked.updatePost({ id, type, post: edits, removeFiles: [savedFile] }). The removal applies to the merged post, so the selected file must still be present in that result. Use the normal updated-array approach when also replacing the same file. At the HTTP API level, this is PUT /api/post with { id, type, post, merge: true, removeFiles }.
Successful saves and post deletions automatically release removed managed attachments. Files still referenced by another record or field remain available. Cleanup includes the original upload and its stored image/video variants, runs after the data commits, and retries temporary storage failures. Completed uploads that are never attached to a saved record are retained for 24 hours for retries, then become eligible for cleanup. External files are never deleted. Preserve the full saved file metadata when sharing attachments; metadata without a managed ID does not become a managed reference.
Automatic security checks
Frontbacked protects sign-in, registration, password recovery, and visitor form submissions with automatic security checks. FQL submit bindings and Frontbacked form methods open a small verification dialog when needed, then continue the original submission after verification. Recently verified browsers can continue without repeated checks. Repeated unsuccessful sign-ins can trigger a fresh check.
If the embedded check cannot load, choose Open verification page. After completing the check, you return to the page you were using. Submit the form again to continue; passwords are never carried through the verification URL or saved for this redirect.
Site owners can turn on Under attack from Abuse and protection in site admin. Unverified page visitors must complete a check before continuing, and unverified form submissions require verification. Recently verified visitors can continue smoothly. Request limits remain active in both automatic and under-attack modes.
Continue with Page editor reference.