Custom download file with Http Range

Hello everyone,

I have a Tus Node server that connects and stores files on S3 Minio. Now I want to customize the file download. Specifically, configure the http-range in the request headers so that the client can download in parts and can continue downloading if an error occurs without having to download from the beginning.

I tried to customize in the onIncomingRequest() function but I don’t know how to call the getObject() function from S3 to implement the above idea. I look forward to receiving everyone’s suggestions and help.

Thank you very much.

Hi, since get handlers are not part of the tus spec, you could implement them yourself. I think you can configure your own S3 client with the same config you pass to the S3 store and then use that to return the file offset based on the range.

1 Like