I create a website in which each user is assigned a photo.
This is done as follows. A person visits the site and is registered. The site has an area where you can take snapshots from a webcam, for this you can use a canvas
object with src
equal to the base64-code of the photo. By pressing the button, php transfers this src
(of course, parsed) to the table.
And the problem is that when I try to decode and then open the image, I get an error that the file is damaged or too large. I created a text entry field and before sending the base64 code I write there. There is no problem when decoding base64 code from the text field. Also noticed that the length of base64 codes in the test field and in the table are different. In the table I use the LongText
or MediumText
, since the image is large (I tried it with small ones, the result is the same), the encoding is ascii
What could be wrong?