Fix requests comments upload files s3#331
Fix requests comments upload files s3#331Samk13 wants to merge 1 commit intoinveniosoftware:masterfrom
Conversation
70a0600 to
0f9ebc2
Compare
6e53283 to
26db46a
Compare
* fix file preview not showing for S3 instances
26db46a to
1e71ae7
Compare
| return; | ||
| } | ||
| if (info.alt) { | ||
| this.editorRef.current.insertContent(`<img src="${location}" alt="${info.alt}">`); |
There was a problem hiding this comment.
Do images always have an alt provided? I'm wondering if there is not a better way to distinguish between images and files.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
❤️ Thank you for your contribution!
Description
RichEditorNote that I only tested these changes locally. I have not yet verified them with an
S3 file origin that differs from the
localhostapp 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: