Upload a File

DESCRIPTION:

Upload a file from local folder to a remote server. If file already exists on the server, the file is overwritten.

USAGE:

webDav.uploadFile(serverUrl, userName, password = NA, remoteLocation, localLocation)

ARGUMENTS:

serverUrl
A character string identifying the server's address (for example: "http://myserver:8080").
userName
A character string containing the identifier (the login name) of user (for example: "johndoe").
password
A character string used to log into the server (for example: "myPassword").
remoteLocation
The full path (including the name of the file) where you want the file uploaded.
localLocation
Full path (including the file name) of the file that you want to copy. For example, C:\myfiles\testfile.jpg.

DETAILS:

The password is not encrypted when it is sent from the client to the server. You can omit the password parameter if server does not require one.

VALUE:

Returns a TRUE if upload was successful; otherwise, FALSE. (For instance, returns FALSE if folder on server does not exist or if file does not exist on client.)

SEE ALSO:

EXAMPLES:

## Not run: 
## userName <- "johndoe"
## password <- "mypassword"
## serverUrl <- "http://myserver:8080"
## webdavRoot = paste(serverUrl, "/SPServer/webdav", sep = "")
## resultsFolder <- paste(webdavRoot, "/results", sep = "")
##
## webDav.uploadFile(serverUrl, userName, password, paste(webdavRoot, "/testfile.jpg", sep=""), "c:/myfiles/test.jpg")
## End(Not run)