Is it possible to store 'Data URL' extracted from a canvas by toDataURL("image/png");
in a database and reconstruct the image by retrieving this 'Data URL'? I have tried to store the 'data URL' to a BLOB
.
toDataURL("image/png")
method returns a data URI only. You can store that to sql database easily and the same can be retrieved and used to construct the image. You will have to set the src
of the image with the retrieved data URI. Please refer this one also, this should give you an idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With