Code:
<form action="/action_page.php">
<input type="file" id="myFile" name="filename">
<input type="submit">
</form>
How can I get the buffer of the uploaded image in javascript?
You get the buffer of the image when you write it to memory so you would either need a node js server or PHP backend to retrieve the buffer.
Using javascript https://www.geeksforgeeks.org/node-js-fs-readfile-method/
Using php https://www.php.net/manual/en/function.readfile.php