kidney-exchange icon indicating copy to clipboard operation
kidney-exchange copied to clipboard

Max allowed packet bytes error

Open siv2r opened this issue 4 years ago • 11 comments

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.

siv2r avatar Feb 10 '21 14:02 siv2r

@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?

96RadhikaJadhav avatar Feb 11 '21 12:02 96RadhikaJadhav

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 avatar Feb 11 '21 13:02 siv2r

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

siv2r avatar Feb 11 '21 13:02 siv2r

Okay will work on it. Thank you.

96RadhikaJadhav avatar Feb 11 '21 13:02 96RadhikaJadhav

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

siv2r avatar Feb 13 '21 07:02 siv2r

@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.

siv2r avatar Mar 10 '21 14:03 siv2r

@siv2r can you assign this issue to me?

yash120102 avatar Mar 04 '22 01:03 yash120102

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

inirah02 avatar Mar 04 '22 08:03 inirah02

@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

yash120102 avatar Mar 04 '22 15:03 yash120102

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

siv2r avatar Mar 04 '22 19:03 siv2r

I am begginer . can I contribute in it

Shreyxpatil avatar May 19 '23 11:05 Shreyxpatil