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

@uppy/transloadit: also fix outdated assembly transloadit:result #5246

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Murderlon
Copy link
Member

Ref: #5231

Current state of Transloadit plugin is a bit hacky, keeping track of the same things in multiple places but some more outdated than others. This has all been fixed and simplified in #5158, but let's backport one more fix into 3.x.

Co-authored-by: Marius Kleidl <marius@transloadit.com>
@Murderlon Murderlon requested review from mifi and aduh95 June 11, 2024 15:01
@Murderlon Murderlon self-assigned this Jun 11, 2024
Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/transloadit/lib/index.js b/packages/@uppy/transloadit/lib/index.js
index 7c18c51..529121d 100644
--- a/packages/@uppy/transloadit/lib/index.js
+++ b/packages/@uppy/transloadit/lib/index.js
@@ -743,7 +743,8 @@ function _onResult2(assemblyId, stepName, result) {
   this.setPluginState({
     results: [...state.results, entry],
   });
-  this.uppy.emit("transloadit:result", stepName, result, this.getAssembly(assemblyId));
+  const assembly = this.activeAssemblies[assemblyId].status;
+  this.uppy.emit("transloadit:result", stepName, result, assembly);
 }
 function _onAssemblyFinished2(status) {
   const url = status.assembly_ssl_url;

@aduh95 aduh95 merged commit 5695299 into main Jun 12, 2024
19 checks passed
@aduh95 aduh95 deleted the transloadit-result-fix-again branch June 12, 2024 10:06
@Acconut
Copy link
Member

Acconut commented Jun 13, 2024

Thank you for this! Do you plan on doing another patch release for Uppy 3.x?

@Murderlon
Copy link
Member Author

Yes we can

Murderlon added a commit that referenced this pull request Jun 17, 2024
* 4.x:
  Renames & `eslint-disable react/require-default-props` removal (#5251)
  coalesce options `bucket` and `getKey` (#5169)
  @uppy/aws-s3: add `endpoint` option (#5173)
  @uppy/locales: fix `fa_IR` export (#5241)
  improve companion logging (#5250)
  Release: uppy@4.0.0-beta.11 (#5243)
  @uppy/core: add generic to `getPlugin` (#5247)
  docs: add 4.x migration guide (#5206)
  @uppy/transloadit: also fix outdated assembly transloadit:result (#5246)
  docs - fix typo in the url
  @uppy/core: set default for Body generic (#5244)
  Release: uppy@3.26.1 (#5242)
  docs: clarify assemblyOptions for @uppy/transloadit (#5226)
  meta: Improve aws-node example readme (#4753)
  @uppy/react: remove `react:` prefix from `id` & allow `id` as a prop (#5228)
  Added translation string (it_IT) (#5237)
  docs: correct allowedMetaFields (#5227)
  @uppy/transloadit: fix transloadit:result event (#5231)
  docs: remove `extraData` note from migration guide (#5219)
  @uppy/provider-views: fix wrong font for files (#5234)
@github-actions github-actions bot mentioned this pull request Jun 18, 2024
github-actions bot added a commit that referenced this pull request Jun 18, 2024
| Package              | Version | Package              | Version |
| -------------------- | ------- | -------------------- | ------- |
| @uppy/box            |   2.4.0 | @uppy/onedrive       |   3.4.0 |
| @uppy/companion      |  4.14.0 | @uppy/provider-views |  3.13.0 |
| @uppy/core           |  3.13.0 | @uppy/react          |   3.4.0 |
| @uppy/dashboard      |   3.9.0 | @uppy/remote-sources |   1.3.0 |
| @uppy/dropbox        |   3.4.0 | @uppy/transloadit    |   3.8.0 |
| @uppy/google-drive   |   3.6.0 | uppy                 |  3.27.0 |
| @uppy/google-photos  |   0.1.0 |                      |         |

- @uppy/google-photos: add plugin (Mikael Finstad / #5061)
- examples: updating aws-nodejs example listParts logic for resuming uploads (Mitchell Rhoads / #5192)
- meta: Bump docker/login-action from 3.1.0 to 3.2.0 (dependabot\[bot] / #5217)
- meta: Bump docker/build-push-action from 5.3.0 to 5.4.0 (dependabot\[bot] / #5252)
- @uppy/transloadit: also fix outdated assembly transloadit:result (Merlijn Vos / #5246)
- docs: fix typo in the url (Evgenia Karunus)
- @uppy/companion: Bump ws from 8.8.1 to 8.17.1 (dependabot\[bot] / #5256)
github-actions bot added a commit that referenced this pull request Jun 19, 2024
| Package              |       Version | Package              |       Version |
| -------------------- | ------------- | -------------------- | ------------- |
| @uppy/aws-s3         |  4.0.0-beta.7 | @uppy/locales        |  4.0.0-beta.4 |
| @uppy/box            |  3.0.0-beta.7 | @uppy/onedrive       |  4.0.0-beta.7 |
| @uppy/companion      | 5.0.0-beta.10 | @uppy/provider-views |  4.0.0-beta.9 |
| @uppy/core           | 4.0.0-beta.10 | @uppy/react          |  4.0.0-beta.7 |
| @uppy/dashboard      | 4.0.0-beta.10 | @uppy/remote-sources |  2.0.0-beta.5 |
| @uppy/dropbox        |  4.0.0-beta.8 | @uppy/transloadit    |  4.0.0-beta.9 |
| @uppy/google-drive   |  3.6.0-beta.1 | uppy                 | 4.0.0-beta.12 |
| @uppy/google-photos  |  0.2.0-beta.1 |                      |               |

- meta: ignore `require-default-props` lint rule for function components (Antoine du Hamel / #5253)
- @uppy/provider-views: Renames & `eslint-disable react/require-default-props` removal (Evgenia Karunus / #5251)
- @uppy/companion: coalesce options `bucket` and `getKey` (Mikael Finstad / #5169)
- @uppy/aws-s3: add `endpoint` option (Antoine du Hamel / #5173)
- @uppy/locales: fix `fa_IR` export (Merlijn Vos / #5241)
- @uppy/companion: improve companion logging (Mikael Finstad / #5250)
- @uppy/transloadit: also fix outdated assembly transloadit:result (Merlijn Vos / #5246)
- docs: fix typo in the url (Evgenia Karunus)
- examples,@uppy/locales,@uppy/provider-views,@uppy/transloadit: Release: uppy@3.26.1 (github-actions[bot] / #5242)
- meta: Improve aws-node example readme (Artur Paikin / #4753)
- @uppy/locales: Added translation string (it_IT) (Samuel / #5237)
- @uppy/transloadit: fix transloadit:result event (Merlijn Vos / #5231)
- @uppy/provider-views: fix wrong font for files (Merlijn Vos / #5234)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants