Overview
This node uploads binary files to an Object Storage Service (OSS) bucket. It is useful for automating file storage workflows where files need to be uploaded to a cloud storage bucket with organized paths based on the current date and unique identifiers. Typical use cases include backing up files, storing user uploads, or integrating file storage into larger automation pipelines.
For example, you can use this node to upload images or documents received from previous nodes in your workflow to a specified OSS bucket, organizing them by date and ensuring each filename is unique.
Properties
| Name | Meaning |
|---|---|
| Bucket名称 | The name of the OSS bucket where files will be uploaded. |
| 上传根路径 | The root path inside the bucket under which files will be stored. |
| 待上传文件字段 | The name of the input field that contains the binary file data to be uploaded. |
Output
The node outputs JSON data representing the result of each file upload operation. Each output item corresponds to one uploaded file and includes details returned by the OSS SDK, such as the URL or key of the uploaded object.
If an error occurs during upload and the node is set to continue on failure, the output will include an error object paired with the corresponding input item.
The node does not output binary data itself; it only returns metadata about the uploaded files.
Dependencies
- Requires access to an OSS-compatible object storage service.
- Needs credentials containing endpoint URL, access key ID, and secret key for authentication.
- Uses the
ali-osslibrary to interact with the OSS service. - Uses
dayjsfor date formatting anduuidfor generating unique filenames.
Troubleshooting
- No binary data exists on item!: This error indicates that the specified input field does not contain any binary data. Ensure that the field name matches the binary property holding the file.
- Authentication errors: If the node cannot authenticate with the OSS service, verify that the provided credentials (endpoint, access key, secret) are correct and have sufficient permissions.
- File upload failures: Network issues or incorrect bucket names/pathnames can cause upload failures. Check connectivity and bucket configuration.
- When continuing on failure, errors are included in the output for easier debugging without stopping the entire workflow.
Links and References
- ali-oss GitHub repository – Official Node.js client for Alibaba Cloud OSS.
- Day.js documentation – Lightweight JavaScript date library used for formatting dates.
- UUID npm package – For generating unique identifiers.