Before some of you mark this as duplicate since error 419 using laravel has been answered a million times, this is a bit more complicated and I cant seem to work around it.
I am trying to use Uppy to upload some images however I cant seem to find a way to add the csrf token to Uppy. (https://uppy.io/docs/tus/#headers)
const uppy = Uppy();
uppy.use(Dashboard, { target: '#drag-drop-area', inline: true, height: 450 });
uppy.use(Tus, {
header: 'X-CSRF-TOKEN'+document.querySelector('[name=csrf-token]').getAttribute('content'),
endpoint: 'https://mysitev/tus', // use your tus endpoint here
resume: true,
autoRetry: true,
retryDelays: [0, 1000, 3000, 5000]
})
Does anyone has used Uppy in the past and if so how did you include the csrf_token?
Thanks