Upload File
Uploads a file from the local filesystem to a Google Cloud Storage bucket.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- GCS Client Id - The client identifier obtained from the Connect node.
- Bucket Name - The name of the bucket where the file will be uploaded.
- File Path - The local file system path of the file to upload.
Options
- File Name - The name to give the file in the bucket. If not specified, the original filename will be used.
- Timeout - The maximum time (in seconds) to wait for the upload to complete. Default is 30 seconds.
Output
- File Path - The Google Cloud Storage URI of the uploaded file (e.g., gs://bucket-name/file-name).
How It Works
The Upload File node transfers a file from the local filesystem to a Google Cloud Storage bucket. When executed, the node:
- Validates the provided inputs (GCS Client Id, Bucket Name, File Path)
- Uses the existing storage client connection
- Opens the local file for reading
- Uploads the file content to the specified bucket with the given or default filename
- Returns the GCS URI of the uploaded file
Requirements
- A valid GCS Client Id from a successful Connect node execution
- Valid bucket name that exists in Google Cloud Storage
- Valid local file path that exists and is readable
- Proper permissions to write objects to the specified bucket
- Sufficient disk space and network connectivity
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid GCS Client Id
- Empty or invalid Bucket Name
- Empty or invalid File Path
- File does not exist or is not readable
- Bucket does not exist
- Insufficient permissions to upload files
- Google Cloud Storage service errors
- Upload timeout exceeded
- Network connectivity issues
Usage Notes
- The File Name option allows you to rename the file during upload
- If File Name is not specified, the original filename is used
- Object names can include folder-like paths (e.g., "folder/subfolder/file.txt")
- The Timeout option helps prevent hanging operations for large files
- Make sure the authenticated account has the necessary permissions to upload files
- The output File Path provides a direct reference to the uploaded object
- Large files may require longer timeouts
- The uploaded file will be accessible via the returned GCS URI
- Existing files with the same name will be overwritten