Answer the question
In order to leave comments, you need to log in
How to send canvas to server?
There is nothing tricky about sending the form to the server with Ajax.
There is nothing tricky about drawing an image in an HTML5 Canvas.
But I'm trying to send a picture from Canvas and I'm in a stupor :)
On the canvas side, everything is OK, the picture is ready, stuffed into data:image/png;base64,....... and transmitted by Ajax to the server in $_POST[' picture'].
The server, on the other hand, expects a picture in $_FILES - and in general this is good, you cannot refuse this useful mechanism.
But $_FILES is empty... Ajax knows nothing about it, and it won't work with the form: it's not the file uploaded by the user that is sent to the server, but the result from the Canvas. And here is the ambush.
All I found about this is one and a half articles for 200 * year and error 404 everywhere ...
What to do, comrade?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question