uploadthing icon indicating copy to clipboard operation
uploadthing copied to clipboard

[bug]: Multiple file uploads seem to trigger twice

Open AlemTuzlak opened this issue 1 year ago โ€ข 3 comments

Provide environment information

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
    Memory: 2.90 GB / 31.71 GB
  Binaries:
    Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.6.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.8.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 128.0.6613.138
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @uploadthing/react: ^7.0.2 => 7.0.2
    typescript: ^5.1.6 => 5.6.2
    uploadthing: ^7.0.2 => 7.0.2

Describe the bug

I followed your remix guide and added a multiple file dropzone https://github.com/user-attachments/assets/c6cdf72b-9763-41a7-be9a-20bee2032876

Link to reproduction

https://stackblitz.com/~/github.com/AlemTuzlak/uploadthing-remix

To reproduce

click on the text of the dropzone and try to upload multiple files add your key in the .env first though

Additional information

No response

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

  • [X] ๐Ÿ™‹โ€โ™‚๏ธ Yes, I'd be down to file a PR fixing this bug!

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

AlemTuzlak avatar Sep 19 '24 17:09 AlemTuzlak

cc @markflorkowski event.stopPropagation() bug that you were fighting with in #886

juliusmarminge avatar Sep 19 '24 20:09 juliusmarminge

I hadn't seen it in the react package, but yeah this sounds like the same issue

markflorkowski avatar Sep 19 '24 20:09 markflorkowski

I added stopPropagation in the onDropCb and it seems to fix it the first time then it breaks the 2nd time you try

AlemTuzlak avatar Sep 19 '24 21:09 AlemTuzlak