WebDAV connects to webDAV endpoints and issues upload, download, list and delete commands.

Take a look at the configuration parameters of the component:

  • Account: account to be used by the component.

  • Host: name of the host for connection.

  • File Name: name of the local file without path.

  • Remote File Name: name of the remote file without path.

  • Directory: remote directory.

  • Operation: command used to download, upload, list or delete.

  • Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

Messages flow

Input

The component waits for a message in the following format:

{        
"fileName": "file",
"remoteFileName": "remoteFileName",
"remoteDirectory": "remoteDirectory"
}

Local File Name overrides the default local file and Remote File Name substitutes the default remote file.

Output

{        
"status" : {
"fileName": "",
"remoteFileName": "",
"remoteDirectory": "",
"success": ""
}
}

Local File Name is the local file generated from a download. Remote File Name is the remote file generated from a successful upload.

IMPORTANT: the files manipulation inside a pipeline occurs in a protected way. All the files can be accessed with a temporary directory only, where each pipeline key gives access to its own files set.

WebDAV in Action

Delete

  • Configuration

{
"type": "connector",
"name": "webdav-connector",
"stepName": "test-ftp",
"accountLabel": "webdav",
"params": {
"operation": "DELE",
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"host": "https://ftp13.interfile.com.br/",
"remoteDirectory": "/remote.php/webdav"
}
}

  • Output

{
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"remoteDirectory": "/remote.php/webdav",
"success": true
}

Download

  • Configuration

{
"type": "connector",
"name": "webdav-connector",
"stepName": "test-ftp",
"accountLabel": "webdav",
"params": {
"operation": "RETR",
"host": "https://ftp13.interfile.com.br/"
}
}

  • Input

{
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"remoteDirectory": "/remote.php/webdav"
}

  • Output

{
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"remoteDirectory": "/remote.php/webdav",
"success": true
}

Upload

  • Configuration

{
"type": "connector",
"name": "webdav-connector",
"stepName": "test-ftp",
"accountLabel": "webdav",
"params": {
"operation": "STOR",
"host": "https://ftp13.interfile.com.br/"
}
}

  • Input

{
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"remoteDirectory": "/remote.php/webdav"
}

  • Output

{
"fileName": "data.csv",
"remoteFileName": "data11.csv",
"remoteDirectory": "/remote.php/webdav",
"success": true
}

Did this answer your question?