you should make a new function like getBase64();
is this JS canvas How'll I Get Images for my server side ?