-
Notifications
You must be signed in to change notification settings - Fork 72
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
Incorrect File Size Calculation During Upload for Compressed Files in Birth Registration #7840
Comments
I made a PR for this one here : #7840 |
Hi Rija, thanks for reporting!
I think what causes confusion and the weird experience is the fact that we allow countries to define The way to solve the issue is either
@jpye-finch @Alta-Nel what are your views on this? Think we need to consider the most user-friendly option here. |
Hello @rikukissa, By the way, can country integrators customize the |
Total file size calculation fixed in #7961 |
Thanks @rikukissa and @tahmidrahman-dsi 🙏 . |
Describe the bug
During the birth registration process (tested in OpenCRVS-Madagascar), files are compressed before being uploaded. However, the system calculates the total upload size based on the original, uncompressed file sizes, which results in an incorrect size calculation for enforcing the 20MB limit.
I should be able to upload multiple compressed files as long as their total size remains under the 20MB limit. However, the system currently restricts me to only three files because it incorrectly calculates the total size based on the original file sizes rather than the compressed sizes.
Which feature of OpenCRVS your bug concerns?
This bug concerns the File Upload feature during birth registration. Specifically, it involves the compression process and the enforcement of the 20MB file size limit.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The total size of the uploaded files should be calculated based on the compressed versions of the files. The system should ensure that the total size of the compressed files does not exceed the 20MB limit, preventing any inaccurate size limit enforcement.
Actual behavior
Currently, the system calculates the total size based on the original file sizes before compression. This causes the size limit enforcement to be incorrect, potentially blocking uploads even when the compressed total is below 20MB.
Screenshots
OpenCRVS Core Version:
v1.6.0 (Git branch: master / release-v1.6.0)
Country Configuration Version:
v1.6.0 (Git branch: master / release-v1.6.0)
Desktop (please complete the following information):
OS: Ubuntu 24
Browser: Chrome
Version: recent version 130.0.6723.58
Possible fixes
Modify the file size calculation logic to only include the sizes of the compressed files instead of the original file sizes.
This can be done post-compression during the upload process.
Reproducible demo
N/A (If available, provide a demo link or project for reproduction.)
The text was updated successfully, but these errors were encountered: