print $success ? $file : ‘Unable to save the file.’;
The next post will be the slightly more complicated front-end code. This was particularly designed for a Sencha Touch iPad app that will allow people to sign with their finger. It has some flaws, but the basics are pretty reusable and good!
Your result may look something like this:
Copy from http://j-query.blogspot.fr/2011/02/save-base64-encoded-canvas-image-to-png.html