siv2r / kidney-exchange

A platform to facilitate automized inter-hospital kidney transplants.
https://ke.iitm.ac.in/kidney-exchange/
GNU General Public License v3.0
47 stars 104 forks source link

Max allowed packet bytes error #35

Open siv2r opened 3 years ago

siv2r commented 3 years ago

Users can upload file size up to 2MB but the default SQL insertions for BLOB type is 1MB. Therefore error occurs when the user uploads a filesize between 1 MB - 2 MB.

Possible soln: Limit the file size to 1MB instead of 2MB in jQuery form validation.

96RadhikaJadhav commented 3 years ago

@siv2r Please correct me if I'm wrong.

Solution would be -> setting paramBytes = param1024 instead of paramBytes = param1024*1024 in editPairForm.js and reg-form.js files?

siv2r commented 3 years ago

Solution would be -> setting paramBytes = param_1024 instead of paramBytes = param_1024*1024 in editPairForm.js and reg-form.js files?

This is not a correct approach. This will limit the file size to 2 KB instead of 1 MB. Since param is in bytes so, parm*1024 (kilobytes) and param*1024*1024 (MegaBytes)

siv2r commented 3 years ago

An ideal way would be to replace 2 with 1 in the following lines on both editPairForm.js and reg-form.js :)

https://github.com/siv2r/kidney-exchange/blob/master/scripts/editPairForm.js#L464-L488

96RadhikaJadhav commented 3 years ago

Okay will work on it. Thank you.

siv2r commented 3 years ago

Reopening issue since the error message say 2 MB instead of 1 MB

siv2r commented 3 years ago

@Abhi-1313 Feel free to work on this issue! Also do not share any personal information here. Please read the contributor's guidelines before contributing to this project.

yash120102 commented 2 years ago

@siv2r can you assign this issue to me?

inirah02 commented 2 years ago

I want to work on this issue I'm GSSoC'22 Contributor

yash120102 commented 2 years ago

@siv2r When i am trying to run the application, i can see home page but when i am navigating to login or signup i am getting The requested resource /kidney-exchange/pages/signup.php was not found on this server. I am running it using docker

siv2r commented 2 years ago

Hmm, the docker is not updated yet. Can you try without the docker?

Shreyxpatil commented 1 year ago

I am begginer . can I contribute in it