I’m having a weird issue,
During an upload (I use Uppy on react btw), when i pause it, and attempt to resume the upload, series of HEAD requests are made, but the “upload-offset“ in the response headers comes in as NaN.
e.g.
HTTP/1.1 200
X-Powered-By: Express
Vary: Origin
Access-Control-Allow-Credentials: true
access-control-allow-origin: http://localhost:3000
access-control-expose-headers: Authorization, Content-Type, Location, Tus-Extension, Tus-Max-Size, Tus-Resumable, Tus-Version, Upload-Concat, Upload-Defer-Length, Upload-Length, Upload-Metadata, Upload-Offset, X-HTTP-Method-Override, X-Requested-With, X-Forwarded-Host, X-Forwarded-Proto, Forwarded,
cache-control: no-store
content-type: text/plain;charset=UTF-8
tus-resumable: 1.0.0
upload-length: 40463683
upload-metadata: upload-ref OTEzZTFhZGItMjg4Mi00MTdiLWJjYjAtODhhNmQ2Y2RhODEz,name bmV3MS5tcDQ=,type dmlkZW8vbXA0,filetype dmlkZW8vbXA0,filename bmV3MS5tcDQ=
upload-offset: NaN
Date: Mon, 18 Aug 2025 12:11:14 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Here is what my TUS server setup looks like
const s3Store = new S3Store({
partSize: 5 * 1024 * 1024,
s3ClientConfig: {
endpoint: process.env.SUPABASE_STORAGE_ENDPOINT,
bucket: mediaUploadBucketName,
region: process.env.SUPABASE_STORAGE_REGION,
credentials: {
accessKeyId: process.env.SUPABASE_STORAGE_ACCESS_KEY_ID ?? '',
secretAccessKey: process.env.SUPABASE_STORAGE_SECRET_ACCESS_KEY ?? '',
},
forcePathStyle: true,
logger: console,
},
});
export const uploadApp = express();
const server = new Server({
path: "/api/post-media-upload",
datastore: s3Store,
maxSize: 1024 * 1024 * 1024, // 1GB
async onIncomingRequest(req) {
tusAuth(req);
},
async onResponseError(req, err) {
// console.log(err);
return { status_code: 500, body: "Internal server error" };
},
});
uploadApp.all("*", server.handle.bind(server));