Tried uploading in pure JS but fail on some images because of Acess-Control-Allow-Origin exception