Skip to content

feat(encryption): add support for editing instances from encrypted form (Base 7.6.1) - #3

Open
kelvin-muchiri wants to merge 7 commits into
ona-buildfrom
enc-form-editing-7.6.1
Open

feat(encryption): add support for editing instances from encrypted form (Base 7.6.1)#3
kelvin-muchiri wants to merge 7 commits into
ona-buildfrom
enc-form-editing-7.6.1

Conversation

@kelvin-muchiri

Copy link
Copy Markdown
Collaborator

No description provided.

When editing an encrypted form without modifying media files, getCurrentFiles()
returns string filenames for unchanged files instead of Blob objects. The
encryptor requires Blobs for encryption.

This adds _convertFilesToBlobs() which fetches the actual file data for
string filenames before encryption, handling both data URIs and remote URLs,
enabling submission of edited encrypted forms with unchanged media.
Pre-fetch all instance attachment URLs as Blobs when an encrypted form
opens for editing, while the Redis cache is still fresh. This prevents
404s when the user takes longer than the 30s cache TTL before submitting.
The prefetched Blobs are returned directly from getCurrentFiles(), removing
the need for _convertFilesToBlobs in the encryptor and its circular
fileManager import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant