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
Uploading a file put's it in 2 different folders #180
Comments
Hello, Meet the same issue, successfull uploads remain in both It is consumming space twice. |
I can confirm this issue as the current storage providers (localstorage & s3storage) do not clean up the temporary uploaded file after they copied it to the final location. It would have been better to move the file and do the encryption (if enabled) in place instead of streaming it from one location to the other on the file system (and forgetting to remove it). If anyone feels up to it, the place to fix it is in localstorage.js and s3storage.js. I would be happy to accept a PR that fixes this. |
Is there any progress on this? I like the project allot but will have to find an alternative if this isn't easily fixed. My root partition is a small SSD with a large array of spinning rust as storage, I can't risk the root partition filling up with duplicates. |
Workaround that worked for me was to create a cronjob to clean the temp folder. |
Thanks hilite, I assume it's best to rebuild the docker image to run cron inside the same container? I'm relatively new to docker but enjoying the possibilities! |
@doug86i No, one container per process. But running cron separately for this is probably an overkill. You'd be better off creating a script that calls But as this is only trivial, it'd be easier to just run
so that would want to go in it's own script and that would be called via cron on the host. |
I just noticed that somehow when uploading a file, youtransfer "uploads" it a second time to another folder. I noticed this when trying to upload a 3GB file. With the command df the space used went up 6GB instead of only 3GB. After seemingly finishing uploading the file, it doesn't show the finished upload window but waits for a few more seconds. This "wait time" is probably when Youtransfer is copying it to the second folder.
In the youtransfer settings, the local file system path is set to /opt/youtransfer/uploads . Tried it again with a smaller file of 1.7M which gets correctly put it in /opt/youtransfer/uploads :
-rw-r--r-- 1 root root 1.7M Mar 16 08:55 37c828d1445fcaa95a0d2ed187d67390.binary
-rw-r--r-- 1 root root 503 Mar 16 08:55 37c828d1445fcaa95a0d2ed187d67390.json
But somehow also in the youtransfer folder at /opt/youtransfer, just under a different name :
-rw-r--r-- 1 root root 1.7M Mar 16 08:55 upload_1150d878777d63ed5603e2399ffff545
edit1 : I tried removing the file upload_1150d878777d63ed5603e2399ffff545 in /opt/youtransfer .
Downloading the file still works afterwards. A workaround would be to create a cron that removes all upload_ files in /opt/youtransfer
Is this a problem with my installation or does anyone notice the same behavior?
Thank you for any kind of help.
The text was updated successfully, but these errors were encountered: