Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Drawing not works #530

Open
MonaGraphic opened this issue Oct 9, 2018 · 4 comments
Open

Drawing not works #530

MonaGraphic opened this issue Oct 9, 2018 · 4 comments

Comments

@MonaGraphic
Copy link

Hello,

drawing zone is displayed but i cant draw. When i inspect element and close windows, i can draw.

Any idea ?

Another question, it is possible to save drawing on server ? If yes, how ?
Thanks.

@LogicalAnt
Copy link

For the first part of the issue still looking for a solution. As for the second part, you can save the image

Get image data:
var imageData = (lc.getImage().toDataURL('image/png'));

Save as image:
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);

now save the data wherever or however you like.

@MonaGraphic
Copy link
Author

@unreleased01 Thanks for your answer !

For the first point, it's a known problem ? is there a temporary solution ?

Thanks for the code, where can i define the path to save on server ?

Thanks.

@LogicalAnt
Copy link

php solution for file upload:
file_put_contents('desired_path/desired_filename.extension', $data);

@MonaGraphic
Copy link
Author

Thanks a lot, i'll try it and come back to you i needed.
Keep me informed for my first problem cause it's really embarrassing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants