tus / tus-node-server

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

Simultaneous file upload leads to corrupted files #592

Closed mstasa closed 5 months ago

mstasa commented 6 months ago

I am using pure tus server for node.js under proxy (nginx). Single upload works fine. I wanted to test it under stress and I started upload from two different IPs. It looked fine but md5 checksum showed the file is different if the file was uploaded with another file simultaneously. However, both files were corrupted. (Comment: simultaneous upload used different files, not the same file).

This is quite disturbing.

I have found the similar bug on tus-php. Has anybody solved this issue? Much appreciated.

Murderlon commented 6 months ago

Hi, I'm not sure I understand. Do you simply mean starting to different uploads at the same time? This server is ran in production at scale by multiple companies, such a big flaw would probably have been noticed.

Do you have a reproducible example?

Perhaps you are trying to use the concatenation extension (parallel chunks), which isn't supported.

mstasa commented 5 months ago

I was not able to replicate this problem again. I will try some more tests in few weeks. Thank you.