Skip to content

File attachments can overflow message input and have no count or total-size limit #211

Description

@keshav0479

While testing file attachments, I noticed message input allows adding a lot of files, including the same file multiple times.

The app has a 10 MB per-file limit, but I could not find any limit on the number of attachments or the total attachment size. I was able to attach 31 files and store about 58 MB in the browser. Since there is no total-size limit, this can keep growing until browser storage quota is hit.

Many attachments overflow the message input

After enough files are added, the message input becomes hard to use. The attachment preview takes over input area, and I had to zoom the browser out to reach message box again.

I also checked browser storage after testing. The files were stored in IndexedDB under routstr-files, including repeated copies of the same PDF.

Attachments stored in browser IndexedDB

I also noticed SVG handling is inconsistent. If I select an SVG from the file picker, it gets accepted as an image attachment. But if I drag/drop the same SVG, app rejects it with:

SVG files are not supported. Please use PNG, JPG, or WebP

So the same file behaves differently depending on how it is added.

Also the file errors show up as browser's default alert popup, even though rest of the app uses toast messages. The messages are inconsistent too, picker and drag/drop show different text, and paste just fails silently.

Expected behavior:

  • Show accepted file types and the 10 MB per file limit before upload
  • Add a max attachment count
  • Add a total attachment-size limit
  • Warn or block when the same file is attached repeatedly
  • Keep the message input usable when many files are attached, probably with a scrollable attachment preview area
  • Make SVG handling consistent across picker, paste, and drag/drop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions