I have a url and I want to upload the file through R, I notice that it download.filewill be useful, but my problem seems different:
url <- "http://journal.gucas.ac.cn/CN/article/downloadArticleFile.do?attachType=PDF&id=11771"
destfile <- "myfile.pdf"
download.file(url, destfile)
This does not work! I notice that if mine urlhas a form xxx.pdf, then the code above is not a problem, otherwise the uploaded file is damaged.
Does anyone know how to solve this problem?
source
share