-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: download specific file versions #136
Labels
Comments
Hi @eshom. I agree file version support would be a useful addition to osfr. It's definitely on the roadmap. |
@eshom , would you mind sharing your code with the manual solution? I'm trying to figure out a way to do this programmatically, but can't see how. |
@egouldo Sure! Here's a reproducible example: tmp <- tempfile()
base_url <- "https://osf.io/"
download_version_endpoint <- "/download?version="
quality_metrics <- "qpfw5"
version <- 1
download_url <- paste0(base_url, quality_metrics, download_version_endpoint, version)
cat("Downloading:\n")
download.file(download_url, tmp)
cat("Deleting", paste0("'", tmp, "'"), "\n")
file.remove(tmp) |
Awesome, thanks so much @eshom ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be very useful to add an argument to either
osf_retrieve_file()
orosf_download()
to choose a specific file version to download. Currently I had to resort to manually downloading specific versions usingutils::download.file()
. Hope to see something like this in the future!The text was updated successfully, but these errors were encountered: