[PATCH] Adapt to status returned by upload