Is there any way to set
Is there any way to set maxDurationSeconds when uploading from a URL?
https://developers.cloudflare.com/api/operations/stream-videos-upload-videos-from-a-url
It seems the Upload-Metadata header is fully ignored here
Under direct creator uploads docs I see that it's possible to set it in the Upload-Metadata header, but it doesn't seem to be working if you upload from a URL
https://developers.cloudflare.com/stream/uploading-videos/direct-creator-uploads/#upload-metadata-header-syntax
16 Replies
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Makes sense, but the docs don't show a way to set maxDurationSeconds there
https://developers.cloudflare.com/api/operations/stream-videos-upload-videos-from-a-url
It doesn't seem to work if I set it in the body...can you confirm if it's possible? If not, would it be possible for it to be added?
Thanks for replying and looking into this
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Yeah I'm just uploading from a file from URL but I'd like to limit the length of the video
This is the body I'm trying to use:
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Right
I was considering using direct creator uploads but I'm worried about if they have a slow upload speed and uploads fail and storage ends up being used for longer than necessary. I'd basically need to set a longer expiration time with direct creator uploads than I'd be comfortable with.
It's a bit easier to manage it like this
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Makes sense -- I'm hoping this can be supported since it helps cut down on API requests which is another thing to worry about
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Thanks again for your time. Will figure out a way to make it work in the meantime
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Yes
I suppose one way around that is to delete an upload in progress before they can start a new one
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I think I'll look into that tonight, thanks for helping me think this through 🙂
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Yeah it makes a lot of sense to handle it that way. It does force me to think about storage more which is a good thing