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

Comments

1 comment

  • Avatar
    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
    Comment actions Permalink

Please sign in to leave a comment.