Actions7
File → Upload File
AI-generatedOverview
This node allows interaction with WebDAV servers to perform file operations such as uploading, downloading, listing, moving, copying, and deleting files or directories. Specifically, the Upload File operation uploads a binary file from the workflow into a specified path on the WebDAV server.
Common scenarios where this node is beneficial include:
- Automating backup of files to a WebDAV-based cloud storage.
- Uploading generated reports or documents from an automation workflow.
- Integrating WebDAV file management into broader workflows without manual intervention.
For example, after generating a PDF report in a previous node, you can use this node's Upload File operation to save that report directly to a WebDAV server folder.
Properties
| Name | Meaning |
|---|---|
| Path | The destination path on the WebDAV server where the file will be uploaded. Must start with "/". Spaces and special characters are automatically URL-encoded. Supports expressions like {{$JSON.filename}}. |
| Binary Property | The name of the binary property in the input data that contains the file to upload (e.g., "data" from a previous Read Binary File node). |
Output
The output JSON for the Upload File operation includes:
success(boolean): Indicates whether the upload was successful (HTTP status code 2xx).statusCode(number): The HTTP status code returned by the WebDAV server.path(string): The path on the WebDAV server where the file was uploaded.contentType(string): The MIME type of the uploaded file.
No binary data is output by this operation; it only returns metadata about the upload result.
Dependencies
- Requires credentials containing the WebDAV server base URL and authentication details (an API key or token).
- The base URL must include the protocol (
http://orhttps://) and be correctly configured in the credentials. - The node uses HTTP methods like PUT to interact with the WebDAV server.
- No additional external dependencies beyond standard HTTP requests and n8n helper functions.
Troubleshooting
- Invalid Base URL: If the base URL in credentials is missing or does not start with
http://orhttps://, the node will throw an error. Ensure the URL is complete and correct. - Missing Binary Property: If the specified binary property does not exist in the input item, an error will occur. Verify the binary property name matches the actual input.
- Path Issues: Absolute URLs are not allowed in the path field; paths must be server-relative starting with
/. Spaces and special characters are auto-encoded, but ensure the path is valid. - Connection Errors: Common network errors like host not found, connection refused, or timeout will produce descriptive error messages indicating issues with server accessibility or credentials.
- HTTP Errors: Non-success HTTP responses will be reported with status codes and messages. Check server permissions and path validity if uploads fail.