Skip to content

[Uploader] Unable to re-add an individual file that has been cancelled. #4395

@silent-e

Description

@silent-e

Environment:

  • Elements version: 25.4.0

Desktop (please complete the following information):

  • OS: macOS Sequoia
  • Browser: Safari, Firefox, Chrome

Steps to reproduce the problem:

  1. Visit the uploader doc page. It even happens here. Easier than coming up with a demo app.
  2. Drop two files on the uploader area. Do not start an upload.
  3. Cancel one of them.
  4. Drop the same file you just cancelled
  5. Scratch your head wondering why the file didn't show up in the list

What is the expected behavior? (Screenshots can be helpful here)

The cancelled file should reappear as a item in the item list.

What went wrong? (Screenshots, console logs, or HAR files can be helpful here)

The state.itemIds object keys (stored here in the code) for the cancelled file were not removed. If a file with a name that matches a key in the itemIds object then that file will not be accepted. You can delete the key matching the filename from state.itemIds, ignoring the longer file id key for the same file, and it will accept the file into the file list again.

The only way to drop the cancelled file again is to remove all files from the list. This resets the itemIds object and so no key collision happens, thus accepting the cancelled file again.

Link to application or sample code:

Link to application? How about the docs. :) https://developer.box.com/guides/embed/ui-elements/uploader/

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