Well, you could do this:
Draw in a canvas the image and convert it to base64. See: How to convert image into base64 string using javascript.
Set the base64 in a hidden input value: document.getElementById("input-id").setAttribute('value', base64Img);
Send it using a form, or jquery, or just plain javacsript. In the form method the user will have to push the submit button. Or you could use document.getElementById("form-id").submit();
This is the form:
<form method="post" action="upload.do" id="form-id">
<input type="hidden" name="base64" id="input-id"/>
<input type="submit"/>
</form>
Now your upload.do
method will have to convert the image back from base64.