Error: Non-256KiB chunk size while using direct url using tus when upload percentage reach 100%

Getting Non-256KiB chunk size error while video file uploading reach to 100% then this error always thrown by tus.
Tus endpoint is own api server endpoint which fetch one-time url from cloudflare and return response with location in headers and tus client always start uploading but when it progress reach to 100% this chunk size error thrown for any video file above 200 mb.

function sample(){
const upload = new tus.Upload(file, {
      endpoint: "http://localhost:5000/test/upload-tus-video", //successfully return one-time direct url in header as required
      retryDelays: [0, 3000, 5000, 10000, 20000],
      metadata: {
        filename: "sample.mp4",
        filetype: file.type,
      onError: function (error) {
        console.log("Failed because: " + error);
      onProgress: function (bytesUploaded, bytesTotal) {
        var percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2);
        console.log(bytesUploaded, bytesTotal, percentage + "%");
      onSuccess: function () {
        console.log("Download %s from %s",, upload.url);