-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server does not correctly close and delete partially uploaded files #198
Comments
Ok I managed to create a hotfix for our instance. https://git.nolog.cz/NoLog.cz/send/commit/f7e889b875538d57ec95f0a5be7a5f7ca25e16db |
If you've been running send for a long time with a bit of traffic, then I recommend running |
The general recommendation is to set up an S3 lifecycle configuration. It can be used to clean orphaned files. Example: https://github.com/timvisee/send/blob/master/s3-lifecycle-example.xml |
We did recently switch to S3, which works fine, but this still is a bug when using local fs as the backend. Send does not properly close the file when an upload fails. Even if something is automatically deleting them externally, I would also expect send to delete incomplete uploads, but that is easily solvable if you have a cronjob running every night. The main issue is that the files are kept open. |
If the user aborts the upload in some way, for example by clicking the "Cancel" button during upload, the server does not correctly close the upload pipeline.
Steps to reproduce
lsof -p <pid>
and see that the file is still open (this blocks automatic deletion by an external script! File does not get actually deleted from fs until the descriptor is closed...)The text was updated successfully, but these errors were encountered: