Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tus: Avoid duplicate upload-error event #5485

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

Acconut
Copy link
Member

@Acconut Acconut commented Oct 9, 2024

Fixes #5473.

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Diff output files
diff --git a/packages/@uppy/tus/lib/index.js b/packages/@uppy/tus/lib/index.js
index f37e9f5..d00dd5a 100644
--- a/packages/@uppy/tus/lib/index.js
+++ b/packages/@uppy/tus/lib/index.js
@@ -206,7 +206,6 @@ function _uploadLocalFile2(file) {
       }
       this.resetUploaderReferences(file.id);
       (_queuedRequest = queuedRequest) == null || _queuedRequest.abort();
-      this.uppy.emit("upload-error", file, err);
       if (typeof opts.onError === "function") {
         opts.onError(err);
       }

Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I assume you tested it still fires once correctly.

@Murderlon Murderlon merged commit 6b2fe32 into transloadit:main Oct 15, 2024
17 checks passed
Murderlon added a commit that referenced this pull request Oct 15, 2024
* main: (65 commits)
  `.handleInputChange()` - use `.currentTarget`; clear the input using `''` (#5381)
  build(deps): bump @blakeembrey/template from 1.1.0 to 1.2.0 (#5448)
  Update packages/@uppy/locales/src/fr_FR.ts (#5472)
  @uppy/svelte: use SvelteKit as the build tool (#5484)
  @uppy/xhr-upload: add response to upload-error callback (#5486)
  tus: Avoid duplicate `upload-error` event (#5485)
  Fix redis emitter (#5474)
  build(deps): bump docker/build-push-action from 6.8.0 to 6.9.0 (#5483)
  Release: uppy@4.4.1 (#5479)
  @uppy/transloadit: fix multiple upload batches & run again (#5478)
  build(deps): bump docker/build-push-action from 6.7.0 to 6.8.0 (#5477)
  build(deps): bump vite from 5.2.11 to 5.4.8 (#5471)
  build(deps-dev): bump rollup from 4.18.0 to 4.22.4 (#5470)
  build(deps): bump vite from 5.2.11 to 5.4.6 (#5466)
  Release: uppy@4.4.0 (#5467)
  @uppy/tus: fix retry check for status code 400 (#5461)
  meta: fix AwsS3 endpoint option in private/dev
  build(deps): bump body-parser from 1.20.2 to 1.20.3 (#5462)
  build(deps-dev): bump vite from 5.3.1 to 5.3.6 (#5459)
  @uppy/tus: set response from tus-js-client (#5456)
  ...
@github-actions github-actions bot mentioned this pull request Oct 15, 2024
github-actions bot added a commit that referenced this pull request Oct 15, 2024
| Package          | Version | Package          | Version |
| ---------------- | ------- | ---------------- | ------- |
| @uppy/companion  |   5.1.2 | @uppy/svelte     |   4.1.0 |
| @uppy/core       |   4.2.2 | @uppy/tus        |   4.1.2 |
| @uppy/dashboard  |   4.1.1 | @uppy/utils      |   6.0.3 |
| @uppy/drag-drop  |   4.0.3 | @uppy/xhr-upload |   4.2.1 |
| @uppy/file-input |   4.0.2 | uppy             |   4.5.0 |
| @uppy/locales    |   4.2.0 |                  |         |

- @uppy/dashboard: Dashboard - convert some files to typescript  (Evgenia Karunus / #5367)
- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input:  `.handleInputChange()` - use `.currentTarget`; clear the input using `''` (Evgenia Karunus / #5381)
- meta: build(deps): bump @blakeembrey/template from 1.1.0 to 1.2.0 (dependabot[bot] / #5448)
- @uppy/locales: Update packages/@uppy/locales/src/fr_FR.ts (Zéfyx / #5472)
- @uppy/svelte: use SvelteKit as the build tool (Merlijn Vos / #5484)
- @uppy/xhr-upload: add response to upload-error callback (Caleb Hardin / #5486)
- @uppy/tus: tus: Avoid duplicate `upload-error` event (Marius / #5485)
- @uppy/companion: Fix redis emitter (Mikael Finstad / #5474)
- meta: build(deps): bump docker/build-push-action from 6.8.0 to 6.9.0 (dependabot[bot] / #5483)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate error emitted when receiving an error from the TUS server.
2 participants