feat(12.2-04): add the fileupload field with deferred uploads on the form session key
- sessionKey.ts: one 32-byte base64url key per form mount, sent only in headers - api/files.ts: FileRoutes over the record and child file routes, XHR upload with progress, 401 refresh and retry - FileuploadField and FileCaptionModal per UI-SPEC section 3: dropzone, image grid, rows, per-item states, client pre-checks, reorder, protected previews - FormView provides FORM_SESSION, counts pending changes as dirty and sends X-Session-Key on create and update - fileupload lang keys in en and pl, admin-spa docs note, deferred smoke test, rebuilt dist
This commit is contained in:
@@ -26,6 +26,14 @@ export function onUnauthorized(handler: UnauthorizedHandler | null): void {
|
||||
unauthorizedHandler = handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports a session that could not be recovered, for requests that do not
|
||||
* go through the typed client (the upload XMLHttpRequest).
|
||||
*/
|
||||
export function reportUnauthorized(): void {
|
||||
unauthorizedHandler?.()
|
||||
}
|
||||
|
||||
/** Registers a listener for successful refreshes (the new access lifetime). */
|
||||
export function onRefreshed(handler: RefreshedHandler | null): void {
|
||||
refreshedHandler = handler
|
||||
|
||||
Reference in New Issue
Block a user