Sometimes a backend has issues handling posting images, Base64 encoding them to a text string allows you to instead send a string, guess you could then send the text string (the Base64 encoded image) to the server, and then avoid the issues some servers have with handling uploaded files. I have removed the Node.Js parts.
Update Added localstorage saving (as base64 encoded string) of uploaded image, if you then reload the last uploaded image is restored.