[GH-ISSUE #423] [Issue]: Attachments silently dropped: paperclip requires multiple clicks, JSON files don't reach model, manual group mode strips file payload #181

Closed
opened 2026-10-20 17:25:59 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @cha1latte on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/423

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Attachments (specifically JSON character card files) silently fail to attach — the paperclip button often requires multiple clicks, the file preview may not render, and on send the message goes through with no file payload, so the AI responds as if nothing was attached. Discord post: https://discord.com/channels/1417099416812392641/1501012967452577832

Expected behavior

When a JSON file is attached via the paperclip button, the file should appear in the input preview, persist when send is hit, and reach the model as readable content (or be properly rejected with a visible error if the file type isn't supported in that mode).

Actual behavior

  • The paperclip/upload button frequently needs multiple clicks before it registers.
  • When a file does get selected, the preview sometimes doesn't render before the send button is hit.
  • On send, the payload contains no attachment and the AI responds as though no file was provided.
  • Reported as worst with JSON files in manual group response mode.

Steps to reproduce

  1. Open Marinara Engine in the default Professor Mari chat.
  2. Set the chat to manual group response mode.
  3. Click the paperclip and attempt to attach a JSON file (e.g. a character card export). May require multiple clicks.
  4. Send the message immediately (before any preview confirms — or even when one does appear).
  5. Observe: the AI replies with no awareness of the file. No attachment was sent.

Environment

OS Version: Windows 10 Version 22H2
Installation Method: Manual
Marinara Engine Version: v1.5.7
Browser or App Shell: Browser

Additional context

Filing on behalf of another user (Rinha Osuzume) who originally reported and diagnosed this.

Likely culprits worth investigating:

  • Drag/drop and paste filter out non-images. The handler appears to use filter((f) => f.type.startsWith("image/")), which means JSON via drag/drop or paste is silently dropped.
  • Manual group mode payload omits attachments. In manual group response mode the outgoing message looks like { role: "user", content: message, characterId: null } — no attachments field. So even when a file successfully previews, manual group mode may strip it on send.
  • Image-only generation path. Non-image files appear to be stored as attachments, but the generation path mostly turns images into model-visible inputs. A JSON character card may never be read as text unless the user pastes the JSON content directly or uses the proper card import flow.
  • FileReader race on send. If the preview doesn't appear before send is clicked, FileReader likely hasn't finished — sending immediately drops the payload.

Possible fixes worth considering:

  • Either accept non-image files in the paste/drop filter, or show a clear "this file type isn't supported here" toast.
  • Include attachments in the manual-group-mode payload, or visibly disable the paperclip when in that mode.
  • Block the send button (or queue the send) until FileReader resolves.
  • If JSON character cards are meant to go through the import flow rather than chat attachments, surface that — when a user attaches a .json to chat, suggest "Did you mean to import this as a character?"

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/423 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Attachments (specifically JSON character card files) silently fail to attach — the paperclip button often requires multiple clicks, the file preview may not render, and on send the message goes through with no file payload, so the AI responds as if nothing was attached. Discord post: https://discord.com/channels/1417099416812392641/1501012967452577832 ## Expected behavior When a JSON file is attached via the paperclip button, the file should appear in the input preview, persist when send is hit, and reach the model as readable content (or be properly rejected with a visible error if the file type isn't supported in that mode). ## Actual behavior - The paperclip/upload button frequently needs multiple clicks before it registers. - When a file does get selected, the preview sometimes doesn't render before the send button is hit. - On send, the payload contains no attachment and the AI responds as though no file was provided. - Reported as worst with JSON files in manual group response mode. ## Steps to reproduce 1. Open Marinara Engine in the default Professor Mari chat. 2. Set the chat to manual group response mode. 3. Click the paperclip and attempt to attach a JSON file (e.g. a character card export). May require multiple clicks. 4. Send the message immediately (before any preview confirms — or even when one does appear). 5. Observe: the AI replies with no awareness of the file. No attachment was sent. ## Environment OS Version: Windows 10 Version 22H2 Installation Method: Manual Marinara Engine Version: v1.5.7 Browser or App Shell: Browser ## Additional context Filing on behalf of another user (**Rinha Osuzume**) who originally reported and diagnosed this. Likely culprits worth investigating: - **Drag/drop and paste filter out non-images.** The handler appears to use `filter((f) => f.type.startsWith("image/"))`, which means JSON via drag/drop or paste is silently dropped. - **Manual group mode payload omits attachments.** In manual group response mode the outgoing message looks like `{ role: "user", content: message, characterId: null }` — no attachments field. So even when a file successfully previews, manual group mode may strip it on send. - **Image-only generation path.** Non-image files appear to be stored as attachments, but the generation path mostly turns *images* into model-visible inputs. A JSON character card may never be read as text unless the user pastes the JSON content directly or uses the proper card import flow. - **FileReader race on send.** If the preview doesn't appear before send is clicked, FileReader likely hasn't finished — sending immediately drops the payload. Possible fixes worth considering: - Either accept non-image files in the paste/drop filter, or show a clear "this file type isn't supported here" toast. - Include attachments in the manual-group-mode payload, or visibly disable the paperclip when in that mode. - Block the send button (or queue the send) until FileReader resolves. - If JSON character cards are meant to go through the import flow rather than chat attachments, surface that — when a user attaches a `.json` to chat, suggest "Did you mean to import this as a character?" ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:25:59 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (May 5, 2026):

Fixed.

<!-- gh-comment-id:4378159768 --> @SpicyMarinara commented on GitHub (May 5, 2026): Fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#181
No description provided.