Nodes/ComfyUI-MinioConnector/Aliyun OSS Upload Folder ๐Ÿ‘
ComfyUI Node

Aliyun OSS Upload Folder ๐Ÿ‘

Sync a whole folder to Alibaba Cloud OSS โ€” with a filename filter and a path prefix

By MieMieeeeeยทCreated about a year agoยทUpdated about a year agoยท 5
Aliyun OSS Upload Folder ๐Ÿ‘
  • aliyun_oss_connector
  • log
โ—„folder_pathoutputโ–บ
โ—„path_prefixโ–บ
โ—„pattern*โ–บ

This is the workhorse node of the Aliyun half of the pack: walk a folder, upload everything (or everything that matches a pattern) to OSS, preserve the folder structure, and prefix the whole tree if you want it namespaced. It's the node you use to back up an output directory to the cloud, or to ship a structured dataset off the machine.

What it does. Given a folder under your ComfyUI directory, it recursively walks it and uploads every file to your OSS bucket. Object names mirror the local structure relative to the folder you gave it, so output/datasets/cats/001.png becomes object datasets/cats/001.png (or datasets/cats/001.png under whatever prefix you set). The bucket is fixed at init, same as all the Aliyun nodes.

The inputs:

  • aliyun_oss_connector - from InitAliyunOSSConnector.
  • folder_path - relative to the ComfyUI root, default output.
  • path_prefix - prepended to every object key, so you can park this upload under backups/july without touching local layout.
  • pattern - a filename filter, default *. This is the star input and the one that separates this node from its MinIO cousin, which has no filter at all. Set pattern = "*.png" and a folder full of PNGs and JSONs uploads only the PNGs.

How it works. It joins your path onto the ComfyUI base directory, os.walks it, and for each file runs an fnmatch check against the pattern before building the object name and uploading. Same MD5-vs-ETag skip as everywhere else in the pack, so re-running the workflow after adding a handful of files only pushes the new ones - the cloud equivalent of incremental backup. Each upload gets a tqdm progress bar. Output is one log string with a line per file; if nothing matched the pattern it logs "no match file uploaded" instead of pretending success.

Install. One pack, one install. ComfyUI Manager โ†’ search "ComfyUI-MinioConnector" โ†’ install โ†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MinioConnector
cd ComfyUI-MinioConnector
pip install -r requirements.txt

Dependencies: oss2, tqdm, plus Aliyun SDK helpers. Nothing to download, nothing GPU-bound.

Gotchas. The pattern match is on the bare filename, not the full path - so you can't filter on directory with it, only on what the file is called. And the usual cloud rules apply harder here: this pushes real data to real cloud storage, so set the path_prefix before your first run, not after you've dumped a flat folder of 400 images into a bucket. Also remember the path restriction: everything stays under the ComfyUI directory, guardrail by design.

Category๐Ÿ‘ Minio-Connector/๐Ÿ‘ Aliyun OSS Connector

Inputs (4)

NameTypeDefaultDescription
aliyun_oss_connectorALIYUN_OSS_CONNECTORโ€”
folder_pathSTRINGoutputโ€”
path_prefixSTRINGโ€”
patternSTRING*โ€”

Outputs (1)

NameTypeDescription
logSTRINGโ€”