I'm building a simple website that allows image uploading. I'm trying to understand how can I allow the user to upload an image to my server.
I'm asking this question in two aspects:
How is that happening behind the scenes? an HTTP POST request must be sent and I assume that the image is being sent as part of the body. But is it just the bytes that are sent? or is the image being encoded before POSTing? How is Base64 has to do with all of this (if at all)?
How can I implement it using pure Javascript (and maybe the Fetch library) only? I'm using NodeJS in the backend. I have googled this subject and found many examples using jQuery or PHP (as backend). I prefer not using jQuery at all.
Thanks