I’m looking to stream the image data from a canvas tag to a node.js server. I can handle the server-side code myself, but how can I submit the data from a canvas? I’m hoping for a suggestion involving multipart form data because I want to stream the data, since I’m expecting images in the ballpark of 50 MB or so. If I try to post the data all at once, it tends to crash the client’s browser.
Share
You can use
FormDatato emulate a normal"multipart/form-data"file submit:The canvas method
.toBlobis specified but not implemented, you can use a polyfillsuch as canvas-to-blob.js