io: return bad_request if upload data size is zero