Protect against bad request for image upload