Skip to content

Commit

Permalink
show file name when uploading or downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Oct 9, 2018
1 parent a6aa667 commit 3d848aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions R/pb_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ gh_download_asset <- function(owner,
return(NULL)
}

if (!is.null(progress)) {
message(paste("downloading", basename(destfile), "..."))
}

resp <- httr::GET(
paste0(
"https://api.github.com/repos/", owner, "/",
Expand Down
4 changes: 3 additions & 1 deletion R/pb_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ pb_upload_file <- function(file,
}
}


if (!is.null(progress)) {
message(paste("uploading", name, "..."))
}
r <- httr::POST(sub("\\{.+$", "", df$upload_url[[1]]),
query = list(name = asset_filename(name)),
body = httr::upload_file(file),
Expand Down

0 comments on commit 3d848aa

Please sign in to comment.