Skip to main content

Is there any chance to upload a photo from canvas data through javascript?

Comments

1 comment

  • Itay Taragano

    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.