Hi everybody,

I got a problem with the ftpUpload function from the RCurl package. My goal is 
to Upload a lot of files from a local directory to a web server.

1st try :

for (i in 1:length(file)){
      ftpUpload(what=files[i],to=files[i])
}
At i=11 I get : (my server has only 10 available open connections available) :
Erreur dans curlPerform(url = to, upload = TRUE, readfunction = 
uploadFunctionHandler(what,  :
  Got a 421 ftp-server response when 220 was expected

2 nd Try :

ftpConnection=getCurlHandle(userpwd=ftp$userpwd,maxconnects=1,fresh.connect=0)
for (i in 1:length(file)){
      ftpUpload(what=files[i],to=files[i],curl=ftpConnection)
}
And I got this error after 30 files (the error is not linked to the web server 
but to the R session) :
Error in file(file, "rb") : all conection are used

I read the documentation and the options from curl library but I can't find how 
to solve my problem even if I think that the problem is linked to not closing 
the position I opened. Do you have any idea how to solve it ?

Thanks,

Olivier Merle


Une messagerie gratuite, garantie à vie et des services en plus, ça vous 
tente ?
Je crée ma boîte mail www.laposte.net

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to