Hello,
I’m trying to fetch an upload url from the Cloudflare Stream API. Everything’s work fine, but I have two questions:
- How to pass the expiry variable in the Upload-Metadata?
- I’m able to get the location from headers (const location = result.headers.get(‘Location’)) but how can I get the video id (uid) ?
Thanks.
There are many information missing in the documentation.
bruno5
#2
Hello
About your second question:
I’m also having trouble implementing the Upload via the Stream API using TUS, because the documentation is quite incomplete.
In the same request that you get the location, there will be a header with the ID on header
Stream-Media-Id
Try something like:
let uid = result.headers.get(‘Stream-Media-Id’);
Regards
Thanks bruno5, I tried Stream-Media-Id and it works fine.
Hope someone provides answer about the expiry tag!
1 Like