Is there any chance to upload a photo from canvas data through javascript?
Hello there,
Please provide me the tutorial or the steps about how to upload a photo from canvas data in the client side (javascript)
Thank you,,,
0
-
You can upload data-uri image representation (base64 data). For example, with the following image upload tag (in PHP):
<?php echo cl_image_upload_tag('image_id', array("callback" => $cors_location)); ?>
Then you can programmatically upload the data-uri (base64) contained in the
img
variable (in jQuery):$(".cloudinary-fileupload").cloudinary_upload_url(img);
Please make sure that you send your content as a Data-URI as explained here: http://en.wikipedia.org/wiki/Data_URI_scheme.
0
Post is closed for comments.
Comments
1 comment