WebDAV icon

WebDAV

Interact with WebDAV servers for file operations

Overview

This node enables interaction with WebDAV servers to perform file operations such as uploading, downloading, listing, moving, copying, and deleting files or directories. The "Upload File" operation specifically allows users to upload binary files from previous nodes (e.g., a file read node) to a specified path on the WebDAV server.

Common scenarios include:

  • Automating file backups by uploading generated reports or documents to a WebDAV server.
  • Integrating with cloud storage solutions that support WebDAV protocol.
  • Managing website content or assets stored on a WebDAV-enabled server.

Example: Upload a PDF report generated in an earlier workflow step to /reports/2024/report.pdf on your WebDAV server.

Properties

Name Meaning
Path The destination path on the WebDAV server where the file will be uploaded. Must start with "/". Supports expressions like {{$JSON.filename}}. Spaces and special characters are automatically URL-encoded.
Binary Property The name of the binary property containing the file data to upload, typically coming from a previous node's binary output (default is "data").

Output

The node outputs JSON objects for each item processed with the following structure:

  • success: Boolean indicating if the upload was successful (HTTP status code 2xx).
  • statusCode: HTTP status code returned by the WebDAV server.
  • path: The path on the WebDAV server where the file was uploaded.
  • contentType: MIME type of the uploaded file.

No binary data is outputted by this operation since it uploads data but does not return file contents.

Dependencies

  • Requires credentials with a valid WebDAV base URL including protocol (http:// or https://) and authentication details.
  • The node uses HTTP methods authenticated via these credentials to communicate with the WebDAV server.
  • No additional external dependencies beyond the configured WebDAV server and its API.

Troubleshooting

  • Invalid Base URL: If the base URL in credentials is missing or lacks protocol, the node throws an error. Ensure the URL starts with http:// or https://.
  • Missing Binary Data: If the specified binary property does not exist in the input item, an error is thrown. Verify the binary property name matches the actual input.
  • Path Issues: Absolute URLs are not allowed in the path property; paths must be server-relative starting with /. Spaces and special characters are auto-encoded, so avoid manual encoding.
  • Connection Errors: Common network errors like host not found, connection refused, or timeout are caught and reported with helpful messages suggesting to check server hostname, port accessibility, and network conditions.
  • HTTP Errors: Non-success HTTP responses from the WebDAV server are surfaced with status codes and messages to help diagnose permission issues or invalid paths.

Links and References

Discussion