Rlabkey (version 2.8.0)

labkey.webdav.put: Upload a file via WebDAV

Description

This will upload a file to a LabKey Server using WebDAV.

Usage

labkey.webdav.put(
    localFile,
    baseUrl=NULL,
    folderPath,
    remoteFilePath,
    fileSet='@files',
    description=NULL
)

Arguments

localFile

the local filepath to upload

baseUrl

a string specifying the baseUrl for the labkey server

folderPath

a string specifying the folderPath

remoteFilePath

the destination path of this file on the remote server, relative to the folder root.

fileSet

(optional) the name of file server fileSet, which is typically "@files" (the default value for this argument). In some cases this might be "@pipeline" or "@fileset".

description

(optional) the description to attach to this file on the remote server.

Value

TRUE if the file was uploaded successfully

Details

Upload a single file from the local machine to a LabKey Server using WebDAV.

See Also

labkey.webdav.get, labkey.webdav.mkDir, labkey.webdav.mkDirs, labkey.webdav.pathExists, labkey.webdav.listDir, labkey.webdav.delete, labkey.webdav.downloadFolder

Examples

Run this code
# NOT RUN {
## upload a single file to a LabKey Server
library(Rlabkey)

labkey.webdav.put(
    localFile="myFileToUpload.txt",
    baseUrl="http://labkey/",
    folderPath="home",
    remoteFilePath="myFileToUpload.txt"
)

# }

Run the code above in your browser using DataCamp Workspace