gscan
gscan copied to clipboard
Upload files are not getting deleted.
If an uploaded zip file fails during the scanning phase, we do not remove it from the server storage. This can result in unnecessary space occupation, potentially filling up our server storage.
To reproduce this issue:
- In your code, ensure that the uploads folder is empty (for easy debugging).
- Upload a corrupted zip file.
- You will see an error message in the UI, or if you are checking programmatically.
- Now, go back to your code and check the upload folder; you will observe the presence of a zip file.
Expectation: This file should be deleted in case of an error since we generate a unique name for the file every time it is uploaded.
Additional Information.
- I zipped the gscan code for testing this feature.
- Machine information
- Machine OS: Ubuntu 22.04 LTS
- Node version: v18.18.0
- Yarn version: 1.22.21
@JohnONolan Just wanted to confirm if this is a valid bug. If so I will fix it.
@JohnONolan Please check the PR created for this issue
Hey @varadekd, thanks for the issue and PR. Would you be able to create a test to demonstrate the issue, and how the patch resolves it? Thanks!
@ErisDS I can create a test; I just want to make sure that when you say 'create a test to demonstrate the issue,' does this refer to a prefix, a postfix, or both?
My understanding is that it involves a prefix, where we can keep track of exactly what the issue is and how this patch is resolving it.
@ErisDS Please let me know if my understanding with respect to the requirement is correct or not