I want to download canvas as image and one of objects in canvas is an image get it from S3 with "https"
I'm using canvas.toDataURL(...), but it is not working when the image is outside the machine. Any suggestion for the below.
Note: I'm using fabricJS to build the canvas.
const canvasImage = canvas
.toDataURL({
format: "png",
multiplier: canvasWidth / canvas.getWidth()
})
.replace("image/png", "image/octet-stream")
const link = document.createElement("a")
link.download = "my-image.png"
link.href = canvasImage
link.click()