Overview
This node uploads media files (images) to a ComfyUI server. It supports multiple input formats for the image, including URLs, base64-encoded strings, and binary data from previous nodes. The node is useful when you want to programmatically add images to a ComfyUI workflow or environment by sending them directly to the server.
Common scenarios include:
- Automating image uploads as part of an image processing pipeline.
- Integrating external image sources into ComfyUI workflows.
- Handling images generated or transformed in earlier steps and uploading them seamlessly.
For example, you could use this node to upload an image fetched from a URL or generated in a prior step, making it available for further processing within ComfyUI.
Properties
| Name | Meaning |
|---|---|
| Filename | The name to assign to the uploaded file on the ComfyUI server. |
| Input Type | The format of the input image. Options: URL, Base64, or Binary. |
| Input Image | The actual image data as a URL or base64 string (required if Input Type is URL or Base64). |
| Binary Property | The name of the binary property containing the image data (required if Input Type is Binary). |
Output
The node outputs JSON with the following structure:
{
"fileName": "string"
}
fileName: The name of the file as stored on the ComfyUI server, confirming successful upload.
No binary output is produced by this node.
Dependencies
- Requires connection to a ComfyUI server API endpoint.
- Needs an API key credential for authentication with the ComfyUI server.
- Uses the
form-datalibrary internally to construct multipart form requests. - Requires proper configuration of the API URL and API key in the node credentials.
Troubleshooting
Common issues:
- Incorrect API URL or missing/invalid API key will cause authentication failures.
- Providing an invalid or inaccessible URL/base64 string/binary data will result in upload errors.
- Filename conflicts might occur if overwriting is not handled properly, but this node sets overwrite to true by default.
Error messages:
- Errors thrown by the node typically contain the message from the underlying HTTP request failure.
- If the error message indicates authorization failure, verify the API key and permissions.
- If the error relates to the image data, ensure the input matches the selected input type and is valid.
Links and References
- ComfyUI Official Documentation (for understanding the server and API)
- n8n FormData Usage (for multipart form data handling)