I’ve managed to upload with TUS to Cloudflare Stream, but I can’t get the stream-media-id because of this error in Chrome.
This is my code, it is running in a Vue app, so in browser.
Can view it in the network tab though
This is from the Node docs
https://developers.cloudflare.com/stream/uploading-videos/upload-video-file#resumable-uploads-with-tus-for-large-files
renan
January 14, 2021, 7:09pm
#2
This is a bug! We’ll fix in a few hours!
renan
January 14, 2021, 10:21pm
#3
This should now be fixed, could you please retry?
Thanks @renan ! I’m guessing you had to expose the headers or something like that yeh? I thought it couldn’t possibly be you, it had to be me
For those following along this is my new code. (Vue App)
onAfterResponse: (req, res) => {
this.streamId = res.getHeader("stream-media-id");
}
But in the interim, I did manage to get it server-side and send to my client as well…as is currently documented.
renan
January 15, 2021, 2:14am
#5
Yep no problem! The stream-media-id
header had to be in access-control-expose-headers
list for your Javascript to read it and it was missing due to a mistake on our side .
Glad it works for you now.