Suppose we have an <img src='http://example.net/image.png' />
that has been loaded and is displayed by the browser. How can we PUT that PNG file to, say, http://example.net/image2.png, preferably without first GETting it again?
My attempt:
fetch('http://www.example.net', {
method: 'PUT',
headers: {
'Content-Type': 'image/png'
},
body: // What to put here?
}