proper api response handling for upload subcommand