Fix error with image upload due to invalid setting of request