Hi,
I use Uppy in shared context in my svelte app. I have multiple Dahsboards and depending on what dashboard was used to upload the file I add different meta data:
This code works well for files that are added from the PC. But when the Webcam is used the source is Webcam and therefore the Meta-Data is not added.
The best would be to have a event on the dashboard instead of the uppy instance, so the event wouldn’t be called for each dashboard and I would not have to filter for the dashboard id.
Or is there something else that could help me to get custom metadata depending on the Dashboard instance?
<script>
import { Dashboard } from '@uppy/svelte';
const {addFiles, uppy} = getContext('uppyContext');
function handleFileAdded(file) {
if (file.source !== uppyDashID) return;
file.data.meta = metaCrc;
}
</script>
<Dashboard uppy={uppy} plugins={["Webcam"]} props={{
id:uppyDashID
}} />