` onSubmit:function(id,file)
{
image = this.getFile(id)
var fr = new FileReader();
var canvas = document.createElement("canvas");
fr.onload = function()
{
img = new Image();
img.onload = function(){
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext("2d").drawImage(img,0,0);
}
img.src = fr.result;
}
// onload fires after reading is complete
fr.readAsDataURL(image);
}
Now ,how can I add this canvas to fineuploader?I found about the addFile() method but couldn't find a proper way? This is my fineuploader js-> $('#fineuploader').fineUploaderS3({
` onSubmit:function(id,file) { image = this.getFile(id) var fr = new FileReader(); var canvas = document.createElement("canvas"); fr.onload = function() { img = new Image(); img.onload = function(){ canvas.width = img.width; canvas.height = img.height; canvas.getContext("2d").drawImage(img,0,0); } img.src = fr.result; } // onload fires after reading is complete fr.readAsDataURL(image);
Now ,how can I add this canvas to fineuploader?I found about the addFile() method but couldn't find a proper way? This is my fineuploader js->
$('#fineuploader').fineUploaderS3({})