Is there a global boolean "is uploading" somewhere?

Started by sneko2 replies1,085 views
snekoOriginal post
#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