Save File to WebDAV
Ship any local file to a WebDAV server — and delete the original if you want
- filepath
The file-shipping sibling in the goldwins520/Comfyui_saveimg2webdav pack. Where SaveImageToWebDAV uploads a render directly from its tensor, this one takes a plain string file path, reads whatever file sits there, and uploads it to a WebDAV server - then optionally deletes the local copy. Same pack, same credentials setup, different payload. If you've got a Nextcloud, ownCloud, or Synology NAS that speaks WebDAV, this is the "send anything else" node.
When would you actually use it? The honest answer: when you want generated artifacts off the GPU box without manually dragging files around. A few real cases - push a finished video or animated PNG to the NAS for viewing elsewhere, archive a workflow JSON so a script on another machine can grab it, or copy a freshly trained LoRA/checkpoint off to shared storage where other machines read it. The built-in Save Image node handles renders; this handles everything else, and it does it inside the graph so a batch job can end with "everything is now on the server."
How it works
Under the hood it's disarmingly direct. The node takes your filepath string, opens the file in binary mode, and reads the entire thing into memory. Then it does an HTTP PUT to your WebDAV server with basic auth, content type application/octet-stream, at:
{webdav_url}/YYYY-MM-DD/YYYYMMDD_HHMMSS_<original filename>
Note the rename: the timestamp gets prepended, and the file lands under a date folder. That's how the server side stays organized, but it also means the remote name never matches your local path.
If delAfterUpload is on and the upload succeeds, the node removes the local file - retrying up to three times if the OS reports the file is still in use. That's a permanent delete, no recycle bin, so it's worth treating as "move to server" rather than "copy."
The inputs that matter
- filepath - the local path of the file to upload. This is a string you type or wire in, not a file picker.
- webdav_url - base URL of your server. Same as the image node: replace the
http://example.com/webdav/default with your real one, keep the trailing slash. - webdav_username / webdav_password - basic auth credentials, also placeholders you must change.
- delAfterUpload - delete the local file after a successful upload. The interesting toggle, and the one with teeth.
- async_upload - background-thread upload, same caveats as the image node.
The output is the filepath string, passed through unchanged, so you can keep a reference to the local file elsewhere in the graph after the upload fires.
Installing it
Identical to its sibling - this pack installs clean. No requirements.txt, no model downloads, no extra pip packages; the code only uses requests, PIL, and numpy, all already bundled with ComfyUI. ComfyUI Manager (search "Save Image To Webdav") or:
cd ComfyUI/custom_nodes
git clone https://github.com/goldwins520/Comfyui_saveimg2webdav
then restart ComfyUI. Given the ecosystem's usual install pain, this is a refreshingly boring one.
Gotchas and troubleshooting
- There's no retry on failure here. The image node retries three times; this one makes a single attempt, prints the error, and moves on. For a one-off file that's fine; for an unattended queue it means silent-ish misses, so check your console.
- The whole file goes into RAM. Fine for a workflow JSON or a small video. Rough for a multi-gigabyte safetensors - a big checkpoint can spike memory hard. That's the main reason to reach for this node for small artifacts, not giant models.
delAfterUploadis a real delete. Upload "succeeds" per HTTP status, then the local file is gone. On a flaky link where the server half-received a file, you could end up with a corrupted remote copy and no local one. Keep it off until you've seen a few clean uploads.- Your password rides in the workflow JSON. These are plaintext inputs baked into the saved workflow. The README warns about sharing outputs; the actual credential-leak vector is sharing a workflow that contains this node. Strip credentials before posting anything.
- Remote files get renamed. If a downstream script expects the original filename, it'll be looking for
20260816_..._originalnameinstead.
It's a small, single-purpose node, but for "push generated files off this box onto the NAS," it does exactly one thing and does it plainly. Set the URL, set the creds, point it at a file.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| filepath | STRING | — | |
| delAfterUpload | BOOLEAN | false | — |
| webdav_url | STRING | http://example.com/webdav/ | — |
| webdav_username | STRING | username | — |
| webdav_password | STRING | password | — |
| async_upload | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filepath | STRING | — |