Skip to content

Fix requests comments upload files s3#331

Open
Samk13 wants to merge 1 commit intoinveniosoftware:masterfrom
Samk13:fix-requests-comments-upload-files-s3
Open

Fix requests comments upload files s3#331
Samk13 wants to merge 1 commit intoinveniosoftware:masterfrom
Samk13:fix-requests-comments-upload-files-s3

Conversation

@Samk13
Copy link
Copy Markdown
Member

@Samk13 Samk13 commented Apr 11, 2026

❤️ Thank you for your contribution!

Description

AI use disclosure: Most of this PR was generated with Codex, with additional guidance, cleanup, and adjustments to match the existing codebase style.

Note that I only tested these changes locally. I have not yet verified them with an
S3 file origin that differs from the localhost app origin yet.

2026-04-11_14-54-51.mov

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@Samk13 Samk13 force-pushed the fix-requests-comments-upload-files-s3 branch 2 times, most recently from 70a0600 to 0f9ebc2 Compare April 11, 2026 13:23
@Samk13 Samk13 added this to v14 Apr 11, 2026
@Samk13 Samk13 force-pushed the fix-requests-comments-upload-files-s3 branch 4 times, most recently from 6e53283 to 26db46a Compare April 11, 2026 22:46
* fix file preview not showing for S3 instances
@Samk13 Samk13 force-pushed the fix-requests-comments-upload-files-s3 branch from 26db46a to 1e71ae7 Compare April 11, 2026 23:06
@Samk13 Samk13 requested a review from ptamarit April 29, 2026 15:22
return;
}
if (info.alt) {
this.editorRef.current.insertContent(`<img src="${location}" alt="${info.alt}">`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do images always have an alt provided? I'm wondering if there is not a better way to distinguish between images and files.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for this change is that meta.filetype was not reliable in this flow. TinyMCE was reporting images as file, so image uploads were not inserted correctly.

If I understand correctly, alt is not used to distinguish images from files; it is only added after the file has already been classified as an image.

If you have a better suggestion, please let me know and I can update the fix.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot think of another way the documented way using meta.filetype.
If this doesn't work with S3, I guess this is the best we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Requests: Corrupted File Downloads from Requests Conversation Uploads

2 participants