I’m attempting to upload a video from a Java application to the Cloudflare servers and I’m following these guides:
Upload a video file: https://developers.cloudflare.com/stream/uploading-videos/upload-video-file/
By using tus-java-client: https://developers.cloudflare.com/api/operations/stream-videos-initiate-video-uploads-using-tus
However, the same code that works by uploading this video file https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_2MB.mp4 to https://tusd.tusdemo.net/files, gives me the following error when I attempt the same upload to Cloudflare.
Hey, zaid, thanks for helping me out on this!
Please, find my answers inline below:
My tus client is calling https://api.cloudflare.com/client/v4/accounts/<my_account_id>/stream/copy and there’s a request header Authorization: Bearer <my_api_token>. This token has access to Read and write to Cloudflare Stream and Images
I don’t know how to verify that.
Just to confirm, when you say backend, you mean Cloudflare backend, right?
How can I check if this call to request a tokenized URL is being performed?
I’m using the official tus-java-client (https://github.com/tus/tus-java-client) which I assume should take care of all this heavy lifting for me, but please, correct me if I’m wrong.
This is the first time I use it, so I’m not fully aware of everything going on behind the scenes here.
Also, if you could paste the links for the docs you’re mentioning, I could take a look and see if I can find something useful.