ropensci-archive / rfigshare

:no_entry: ARCHIVED :no_entry: An R Interface to 'figshare'
https://docs.ropensci.org/rfigshare
41 stars 12 forks source link

The default setting of method for download.files #111

Closed yufree closed 5 years ago

yufree commented 5 years ago

https://github.com/ropensci/rfigshare/blob/a08dcda1217a0e66e4510ff28a2c3944c5ef5725/R/fs_download.R#L39

Hi, I am trying to download files via fs_download.R but failed. I checked and found if I remove the default setting of method in download.files, the function could work.

Here is a demo:

# this function return error
fs_download(90818,urls_only = F)
# remove method would work
download.file('https://ndownloader.figshare.com/files/89529',destfile = 'test.csv')

Is there specific reason to use method = "internal"? It seems such setting disable the download function.

cboettig commented 5 years ago

yup, that's a legacy from maybe 5 yrs ago; R's download internals have changed a lot since then and this would be better removed. care to send a PR?