Aliyun OSS Upload
Push a ComfyUI output to Aliyun OSS and get back a shareable URL
- oss_url
This node does exactly one thing: takes a file that exists on your machine, uploads it to an Alibaba Cloud OSS bucket, and hands you back a URL. That's it. No queue, no thumbnailing, no resize - a raw object-store put, wrapped in a ComfyUI node.
The reason you'd care: the moment you want a generated image somewhere that isn't your hard drive - a chat bot, a webhook, a Discord post, a small automation that archives every render - you need a URL, and OSS is the cheapest way to mint one. It's Alibaba's S3, and in the Chinese ecosystem it's the default place to park a shareable image. This node is the "push the finished file to the cloud" half of the Comfyui-GLM_Prompt pack (a GLM prompt-helper suite), which is why it ships next to text-prompt and image-to-prompt nodes rather than in some generic storage pack. If you already installed that pack for the GLM nodes, this uploader is sitting in your menu under JFD/aliyun_oss for free.
How it works
Under the hood it's the official oss2 SDK doing a bog-standard upload: build an Auth from your key pair, open a Bucket handle, call put_object_from_file(object_name, local_file_path), then ask the bucket for its region so it can construct a virtual-hosted-style URL in the shape https://{bucket}.{region}.aliyuncs.com/{object}. It's synchronous - the queue blocks until the upload finishes, which is fine for images and noticeably not fine if you hand it a 2 GB video.
The inputs that matter, and honestly all of them are set-it-once strings:
access_key_id/access_key_secret- your Aliyun RAM key pair. Plain text, no env-var support in this node, see the gotchas below.endpoint- the full regional URL, e.g.https://oss-cn-hangzhou.aliyuncs.com. Must match the bucket's region.bucket_name- an existing bucket your key is allowed to write to.local_file_path- absolute path to a file on disk. It checks the file exists and returns an error string if not.object_name- the key inside the bucket, likeoutputs/img_001.png. Relative, no leading slash.
Output is one oss_url STRING. Wire it to a ShowText/primitive display to eyeball it, or straight into whatever HTTP/post node your pipeline uses.
Install
ComfyUI Manager → Install Custom Nodes → search Comfyui-GLM_Prompt, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jiandanplus/Comfyui-GLM_Prompt
then restart ComfyUI. The pack's requirements.txt pulls in oss2==2.15.0 and aliyun-python-sdk-core==2.15.0 (plus zhipuai for the GLM nodes). Manager usually installs deps automatically; if you cloned by hand, pip install -r requirements.txt in the pack folder and restart.
Gotchas that will bite you
- Your keys live in the workflow - and in every saved PNG. These nodes take credentials as node inputs, and ComfyUI bakes workflow data into the image files it saves. Sharing a workflow that contains real keys is the same as posting them. Use a RAM sub-user scoped to just this bucket, or rotate keys, or keep this pack for local-only graphs.
- The "URL" isn't always public. The node builds a URL but OSS only serves it to anonymous browsers if the object/bucket is public-read. Otherwise the URL 403s and looks broken. If you're uploading for anyone else to open, make the bucket public-read (or signed).
- Errors come back as strings, not failures. The node catches everything and returns
"Upload failed: ..."or"Network error: ..."as its successful output. A run can look green while the actual value is an error message - check the text before you trust it downstream.
That last one is the trap, honestly. One quick glance at the output text and you're fine, but it's the thing that'll waste an evening if you feed oss_url straight into a pipeline blind.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| access_key_id | STRING | — | |
| access_key_secret | STRING | — | |
| endpoint | STRING | — | |
| bucket_name | STRING | — | |
| local_file_path | STRING | — | |
| object_name | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| oss_url | STRING | — |