-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Transloadit Assemblies are being cancelled by Uppy when the component unmounts #3547
Comments
Hi. This is working as intended because a react hook (
You can see that the hook is quite simple and the reason why it cancels everything is because of the unmount uppy/packages/@uppy/react/src/useUppy.js Line 20 in d6a5695
|
Another alternative, and arguably better, is to set |
As a newer user of Transloadit / Uppy, I have gone through the documentation for Uppy and Transloadit fairly extensively to try to establish the best in class experience for our users. We are planning on using Transloadit for both video and image / document upload in various areas of our app. Much of the Transloadit documentation steers developers towards not using
As far as Uppy / the uploading user is concerned, their job is done when the file is uploaded. Especially since they could be uploading large videos which may take considerable time to process, we don't want to tie them up. I understand cancelling uploads when unmounting, but sending an assembly cancel notification is unexpected, undocumented, and undesired when We can re-work things to keep useUppy around, but I suspect I am not the first, or last developer to get tripped up on this situation. I feel the ergonomics of Uppy would be better if If nothing will change, at the very least update the documentation to state that assemblies will be cancelled when |
Thanks for your valuable feedback. I agree that the user should not have to sit around and wait for the assembly to complete, and this default behaviour of canceling the assembly even with |
to make canceling assemblies optional possibly fixes #3547
to make canceling assemblies optional possibly fixes transloadit#3547
* change cancel logic to make canceling assemblies optional possibly fixes #3547 * add forgotten file * rewrite to reason='user' * try to fix crash * change reason to unmount * Apply suggestions from code review * add close+unmount in more code examples also fix rule of hooks issue * improve reason docs * add tests * add options also to reset * update doc * also prevent canceling uploads on unmount * Update website/src/docs/transloadit.md Co-authored-by: Merlijn Vos <merlijn@soverin.net> * remove conflicting file Co-authored-by: Merlijn Vos <merlijn@soverin.net>
We are utilizing
<DashboardModal>
via@uppy/react
and theTransloadit
plugin via@uppy/transloadit
. After a file is uploaded successfully, and the page is navigated away from causing the<DashboardModal />
to unmount, an assembly cancel request is automatically called. I can see this in the browser's network console:If this occurs before the file is done being processed, this causes the assembly to cancel.
Here is the code in use:
The text was updated successfully, but these errors were encountered: