tus / tus-node-server

Node.js tus server, standalone or integrable in any framework, with disk, S3, Azure, and GGC stores.
https://tus.io/
MIT License
834 stars 202 forks source link

@tus/s3-store incompatibility with R2 #632

Open elliotdickison opened 4 months ago

elliotdickison commented 4 months ago

R2 has a non-standard requirement that all non-trailing parts of a multi-part upload be exactly the same size. With @tus/s3-store@1.4.3 and @tus/server@1.6.0 get the occasional error InvalidPart: All non-trailing parts must have the same length. from R2 and the multi-part upload fails.

This is definitely a shortcoming with R2 and not a bug with @tus/s3-store, but we're trying to work around the issue anyhow. Any ideas why @tus/s3-store might generate parts of varying sizes (not counting the final trailing part)?

Thanks!

Acconut commented 4 months ago

Similar issue was opened for tusd recently: https://github.com/tus/tusd/issues/1137 My comment there also includes a tusd-specific solution, whose.cincept might be reusable for tus-node-server.