Uploading a video using tus does not return a response object

I use tus to upload videos. The videos load successfully and I can access them, but the documentation says that the response object should be like this:

Response

{
“success”: true,
“errors”: ,
“messages”: ,
“result”: [
{
“allowedOrigins”: [
example.com
],
“created”: “2014-01-02T02:20:00Z”,
“duration”: 300,
“input”: {
“height”: 1080,
“width”: 1920
},
“maxDurationSeconds”: 300,
“meta”: {},
“modified”: “2014-01-02T02:20:00Z”,
“uploadExpiry”: “2014-01-02T02:20:00Z”,
“playback”: {
“hls”: “example/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8”,
“dash”: “example/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd”
},
“preview”: “example/ea95132c15732412d22c1476fa83f27a”,
“readyToStream”: true,
“requireSignedURLs”: true,
“size”: 4190963,
“status”: {
“state”: “inprogress”,
“pctComplete”: 51,
“errorReasonCode”: “ERR_NON_VIDEO”,
“errorReasonText”: “The file was not recognized as a valid video file.”
},
“thumbnail”: “example/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg”,
“thumbnailTimestampPct”: 0.529241,
“uid”: “ea95132c15732412d22c1476fa83f27a”,
“liveInput”: “fc0a8dc887b16759bfd9ad922230a014”,
“uploaded”: “2014-01-02T02:20:00Z”,
“watermark”: null,
“nft”: {
“contract”: “0x57f1887a8bf19b14fc0d912b9b2acc9af147ea85”,
“token”: 5
}
}
]
}

But my response is:

Here is my code:

CODE

const upload = new tus.Upload(file, {
endpoint: https://api.cloudflare.com/client/v4/accounts/${configKeys.CLOUDFLARE_ACCOUNT_ID}/stream,
headers: {
Authorization: Bearer ${configKeys.CLOUDFLARE_API_TOKEN},
},
chunkSize: 50 * 1024 * 1024, // Required a minimum chunk size of 5MB, here we use 50MB.,
uploadSize: file.size,
onError: (err)=>{
console.log(‘error’, err);
throw err;
},

onProgress: (uploadedBytes, totalBytes) => {
  console.log('uploadedBytes', uploadedBytes);
  console.log('totalBytes', totalBytes);
},
onAfterResponse: (req, res)=> console.log('on after', res),
onSuccess: () => {
  console.log('Success, Upload URL:', upload.url);
},

});
upload.start();

Also if i use one-time tokenized URL I still don’t get object like in documentation. I need this object to get video links and thumbnail link