WebDAV icon

WebDAV

Interact with WebDAV servers for file operations

Overview

This node enables interaction with WebDAV servers to perform file operations such as copying files or directories on the remote server. It is particularly useful for automating file management tasks in environments where WebDAV is used for remote file storage and sharing.

A common scenario is copying a file or folder from one location to another within the same WebDAV server, optionally overwriting the destination if it exists. For example, you might use this node to back up files by copying them to a backup directory or to reorganize files by moving copies to new folders.

Properties

Name Meaning
Source Path The path of the resource (file or folder) to copy. Must start with "/". Spaces and special characters are automatically URL-encoded.
Destination Path The target path where the resource will be copied. Must start with "/". Spaces and special characters are automatically URL-encoded.
Overwrite Boolean flag indicating whether to overwrite the destination resource if it already exists.

Output

The node outputs an array of JSON objects, each corresponding to an input item processed. For the Copy operation, each output object contains:

  • success: Boolean indicating if the copy operation was successful (HTTP status code 2xx).
  • statusCode: The HTTP status code returned by the WebDAV server.
  • sourcePath: The original source path provided.
  • destinationPath: The destination path where the resource was copied.

No binary data is output for the copy operation.

Example output JSON:

{
  "success": true,
  "statusCode": 201,
  "sourcePath": "/path/to/source",
  "destinationPath": "/path/to/destination"
}

Dependencies

  • Requires credentials containing the WebDAV server base URL and authentication details (e.g., username/password or token).
  • The base URL must include the protocol (http:// or https://) and be correctly configured in the credentials.
  • The node uses HTTP methods like COPY and expects the WebDAV server to support these operations.
  • No additional external dependencies beyond the WebDAV server and valid credentials.

Troubleshooting

  • Invalid Base URL: If the base URL in credentials is missing or does not start with http:// or https://, the node will throw an error. Ensure the URL includes the protocol and is correct.
  • Absolute URLs in paths: Paths must be server-relative starting with /. Absolute URLs in source or destination paths are rejected.
  • Cross-server copy: The destination must be on the same server as the base URL. Copying to a different server origin will cause an error.
  • Connection errors: Errors like host not found, connection refused, or timeout indicate network or server availability issues.
  • Overwrite behavior: If overwrite is false and the destination exists, the copy may fail depending on server behavior.
  • HTTP errors: Non-2xx HTTP responses will result in failure; the node reports the status code and message.
  • Continue on Fail: If enabled, the node continues processing other items even if some fail, returning error messages per item.

Links and References

Discussion