Changed upload endpoint to /. added check for image