204 No Content but no video is actually uploaded

#1

I am trying to upload a video using Postman and I always get a 204 No Content result that indicates the PATCH request was successful. This is the PATCH request:

curl -X PATCH
{URL_from_Location_header_from_previous_post}
-H ‘Content-Type: application/offset+octet-stream’
-H ‘Postman-Token: {postman_token}’
-H ‘Tus-Resumable: 1.0.0’
-H ‘Upload-Offset: 0’
-H ‘X-Auth-Email: {auth_email}’
-H ‘X-Auth-Key: {auth_key}’
-H ‘cache-control: no-cache’

I have a tried a combination of POST request but nothing works. This is how the payload looks like:

curl -X POST
https://api.cloudflare.com/client/v4/zones/{zone_id}/media
-H ‘Postman-Token: {postman_token}’
-H ‘Tus-Resumable: 1.0.0’
-H ‘Upload-Length: 0’
-H ‘X-Auth-Email: {auth_email}’
-H ‘X-Auth-Key: {auth_key}’
-H ‘cache-control: no-cache’

I have tried adding adding Upload-Defer-Length set to 1 and Upload-Length set to 0. I already tried setting the Upload-Length to a very large amount and also to the length in bytes of the video to be uploaded. But in both cases the response returned is 501 Not Implemented .

What am I missing?

0 Likes