Is there a suggested pattern for handling multiple file uploaders with Uppy and Tus? I’ve seen previous suggestions of one uppy instance, and multiple dashboard with different id’s. However, in my case, I also need to set file metadata that is unique to each dashboard (so dashboard 1 might have the metafield { id: A }, dashboard 2 { id: B}, etc. This data is used by my backend for further processing.
Handling multiple inputs with Uppy and Tus?
Started by mshunjan5 replies701 views
mshunjanOriginal post
mifi
Hi. Have you tried multiple Uppy instances (one per dashboard)?
mshunjanReplying to #2
Yes that is what I have been using as my current solution, but I was wondering if I could clean it up somehow.
mifi
What do you mean by “clean it up”? Does it cause problems to have multiple instances?
mshunjan
Apologies. When I say “clean it up”, I mean I would like to simplify the code. The issue I have with multiple instances is that sharing and accessing state, especially between components, becomes unnecessarily complex.
mifi
Alright. Unfortunately I don’t know of any way to use multiple dashboards on the same Uppy, with different configurations.