Skip to content

fix: attach portal uploads after creating the message - #112

Open
sam0rr wants to merge 1 commit into
clefincode:developfrom
nysma-ca:fix_portal_file_upload
Open

sam0rr wants to merge 1 commit into
clefincode:developfrom
nysma-ca:fix_portal_file_upload

Conversation

@sam0rr

@sam0rr sam0rr commented Sep 14, 2026

Copy link
Copy Markdown

Uploading a file from the portal can fail with a permission error for ClefinCode Chat Message. The upload request uses the conversation ID as the message ID, even though the message has not been created yet.

Remove those two attachment fields from the initial upload. Frappe creates the file for the signed-in user, and the existing send flow links it to the actual message using the returned file ID.

Reproduced the failure and checked the corrected upload and message linkage with a Website User and a staff user on Frappe 16.33.1 and MariaDB 11.8.6. Also checked that the JavaScript still passes the returned file ID to the message sender. Existing file visibility settings are unchanged.

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