Skip to content

Card attachment upload only accepts one file at a time (no multi-file support) #560

Description

@Kazim-Ali-STE

Description

The card attachment upload UI does not support selecting or dropping multiple files at once — only the first file is ever uploaded, even when multiple files are selected in the file picker or dropped together.

Where

apps/web/src/views/card/components/AttachmentUpload.tsx:

  • The file input has no multiple attribute:
    <input
      ref={inputRef}
      type="file"
      id="attachment-upload"
      className="hidden"
      onChange={handleFileSelect}
      disabled={uploading}
    />
  • handleFileSelect only reads the first file:
    const handleFileSelect = async (event: React.ChangeEvent<HTMLInputElement>) => {
      const file = event.target.files?.[0];
      if (!file) return;
      ...
      await uploadFile(file);
    };
  • handleDrop does the same, and even has a comment acknowledging the limitation:
    const files = Array.from(e.dataTransfer.files);
    if (files.length === 0) return;
    
    // Upload the first file (or could upload all files)
    await uploadFile(files[0] ?? new File([], ""));

Confirmed present in v0.5.5, v0.6.0, and main.

Steps to reproduce

  1. Open a card and click the paperclip icon.
  2. Select multiple files in the file picker (or drag-and-drop multiple files onto the card).
  3. Only the first file gets uploaded; the rest are silently ignored.

Expected behavior

Selecting or dropping multiple files should upload all of them (e.g. sequentially or in parallel), not just the first one.

Suggested fix

  • Add multiple to the <input type="file">.
  • In both handleFileSelect and handleDrop, iterate over all selected/dropped files and call uploadFile for each (e.g. for (const file of files) { await uploadFile(file); }), rather than only using files[0].

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