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


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):


    Please make sure that you send your content as a Data-URI as explained here:

    Comment actions Permalink

Please sign in to leave a comment.