Status 400 when uploading video to cloudfare streaming with go-tus

HI there,

I’m trying to setup a quick golang microservice to upload
videos using the tus protocol (as indicated in the official Cloudfare docs),
however I keep getting a 400 error code when trying to setup the upload.

I’m not sure if this is an issue with the go-tus library itself or the Cloudfare
documentation is out of date.

My code is setup exactly as shown here, which produces the error.

On the other hand, substituting the same auth details into the following curl command successfully uploaded the video:

curl -X POST -d '{"url":"<video_url>","meta":{"name":"<video_name>"}}' -H "X-Auth-Key: <api_key>" -H "X-Auth-Email: [email protected]"<account_id>/stream/copy


This was the functioning curl command:

curl -X POST \
  -H "X-Auth-Key: <auth_key>" \
  -H "X-Auth-Email: <email>" \
  -F [email protected]/home/adrian/Development/streaming-service/developers.mp4 \\{<account_id>\}/media

What error do you get? The API should have a error message with the 400 response code.