javascript - send image to server by passing datURL generated from canvas -
i tried save canvas image '~/image/upload' folder in application. error: failed load resource: server responded status of 405 (method not allowed). doing wrong here?
var dataurl = canvas.todataurl(); $.ajax({ type: "post", url: "image/upload", data: { imgbase64: dataurl } }).done(function(o) { console.log('saved'); });
probably url need escaped
var dataurl = encodeuricomponent(canvas.todataurl());
Comments
Post a Comment