# Uploading multiple files fails

**URL:** https://meta.discourse.org/t/uploading-multiple-files-fails/275407
**Category:** Bug
**Created:** [August 16, 2023, 3:14pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407 "2023-08-16T15:14:19Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 16, 2023, 3:14pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/1 "2023-08-16T15:14:19Z")

</div>

When trying to upload 10 files an error message occurs

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/9/a/59aae006282092c5d8ec16f6d8247b50e755de67.png)

Console shows this:

```plaintext
[Uppy] [17:11:51] Failed to upload cce616b640fc4352250416f7f403a35813826092.jpeg Upload error chunk.660.cfa44cc656d26c5d04fa.js:2:209371
    error chunk.660.cfa44cc656d26c5d04fa.js:2
    log chunk.660.cfa44cc656d26c5d04fa.js:2
    ee chunk.660.cfa44cc656d26c5d04fa.js:2
    se chunk.660.cfa44cc656d26c5d04fa.js:2
    emit chunk.660.cfa44cc656d26c5d04fa.js:2
    emit chunk.660.cfa44cc656d26c5d04fa.js:2
    emit chunk.660.cfa44cc656d26c5d04fa.js:2
    upload chunk.660.cfa44cc656d26c5d04fa.js:2
    (Async: EventListener.handleEvent)
    upload chunk.660.cfa44cc656d26c5d04fa.js:2
    upload chunk.660.cfa44cc656d26c5d04fa.js:2
    uploadFiles chunk.660.cfa44cc656d26c5d04fa.js:2
    uploadFiles chunk.660.cfa44cc656d26c5d04fa.js:2
    handleUpload chunk.660.cfa44cc656d26c5d04fa.js:2
    ce chunk.660.cfa44cc656d26c5d04fa.js:2
    upload chunk.660.cfa44cc656d26c5d04fa.js:2
    (Async: promise callback)
    upload chunk.660.cfa44cc656d26c5d04fa.js:2
    scheduledAutoProceed chunk.660.cfa44cc656d26c5d04fa.js:2
    (Async: setTimeout handler)
    oe chunk.660.cfa44cc656d26c5d04fa.js:2
    addFiles chunk.660.cfa44cc656d26c5d04fa.js:2
    _addFiles composer-upload-uppy.js:444
    _run index.ts:665
    _join index.ts:640
    join index.ts:362
    Ember 2
    i uploads.js:266
    i uploads.js:265

```

Sitesetting `simultaneous uploads` is 10.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [August 16, 2023, 4:23pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/2 "2023-08-16T16:23:13Z")

</div>

Hey Richard,  
Is there anything particular regarding your files? When trying to upload 10 pictures with `simultaneous uploads` set to 10, I encounter no issue. I’m on the latest Discourse version.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 16, 2023, 5:16pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/3 "2023-08-16T17:16:31Z")

</div>

Nothing special, random files, I can repro on multiple systems hosted in different places.  
Maybe it’s Firefox… 🤔

EDIT No I can repro on Chrome as well

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [August 17, 2023, 1:30am UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/5 "2023-08-17T01:30:30Z")

</div>

Thanks for reporting Richard; this is a tricky one to debug at times. Can you please enable the site setting `enable_upload_debug_mode`, and hopefully you will get a more detailed error message, and if not if you go to `/logs` on the site it should show a more detailed message.

I know the UX around this is not ideal either. Currently you can upload 10 files and 3 might fail, but we only show the generic dialog and “that file”. At the very least I can see if I can change that dialog to at least show the file name.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 17, 2023, 7:04am UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/6 "2023-08-17T07:04:29Z")

</div>

Thanks Martin. I enabled debugging and digged deeper. I previously overlooked a 503 error that is now showing more clearly.

That 503 error is in `UploadsController.create` and seems to happen when [hijack is called](https://github.com/discourse/discourse/blob/main/app/controllers/uploads_controller.rb#L51). I don’t have much experience with hijack unfortunately.

I have been able to reproduce this on a [standard install](https://meta.discourse.org/t/142537?silent=true) to rule out any Communiteq specific issues:

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [September 6, 2023, 3:26pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/7 "2023-09-06T15:26:31Z")

</div>

Is there any news here? Has anyone been able to reproduce the bug on their instance as well?

---

<div class="post-metadata">

### Author: ![AdamAndrews](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@AdamAndrews](https://meta.discourse.org/u/AdamAndrews)
#### Post date: [September 14, 2023, 1:49am UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/8 "2023-09-14T01:49:16Z")

</div>

Seeing the same problem here after upgrading to 3.x. Often with anything over 10 files it will cause random files in the batch to error out. DO droplet configured with spaces for uploads. No problems with 2.x and a fairly image intensive forum.

 ![errors](https://global.discourse-cdn.com/meta/original/4X/5/a/d/5ad159de4360adac2f8715870f726b9a0c37367a.jpeg)

---

<div class="post-metadata">

### Author: ![68uproars](https://avatars.discourse-cdn.com/v4/letter/6/6a8cbe/32.png) [@68uproars](https://meta.discourse.org/u/68uproars)
#### Post date: [January 8, 2025, 2:16pm UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/9 "2025-01-08T14:16:34Z")

</div>

Any progress? I 'm facing the same issue.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 9, 2025, 12:24am UTC](https://meta.discourse.org/t/uploading-multiple-files-fails/275407/11 "2025-01-09T00:24:06Z")

</div>

No news at the moment, but I can confirm the team is tracking this.
