sneko
1
Hi,
I looked at the documentation and typings in the code on my Uppy instance but I’m unable to find something telling me “an upload is ongoing”.
My use case is I want to prevent submitting a form (or leaving the page) while some uploads are still ongoing.
A workaround would be to list all files and try to see for each:
-
isPaused
is true OR if progress.percentage === 100
But it seems a bit hacky, no?
Thank you,
mifi
2
Hi. I think you can use the upload
event Uppy — Uppy to set your bool to true
then complete
Uppy — Uppy to set the bool to false again
sneko
3
Sounds like a good idea @mifi , a bit surprized there is no simple boolean for this but I’m fine with your solution
I tried to implement it but it seems I have a weird behavior for events with React: Uppy + Transloadit immediately triggers "complete" event but no upload · Issue #4130 · transloadit/uppy · GitHub