Skip to content

Conversation

@jpswelch
Copy link

@jpswelch jpswelch commented Jan 8, 2026

Motivation

Add support for BUCKET_PREFIX environment variable to allow organizing S3 uploaded files under a custom prefix/folder path.

  • When BUCKET_PREFIX is set: uses upload_file_to_bucket with the prefix (e.g., outputs/comfyui/{job_id}/filename.png)
  • When BUCKET_PREFIX is not set: uses original upload_image for backward compatibility

Issues closed

- Add BUCKET_PREFIX environment variable to organize uploaded files under a custom prefix/folder path in S3
- When BUCKET_PREFIX is set, uses upload_file_to_bucket with prefix (preserves original filename)
- When BUCKET_PREFIX is not set, uses upload_image for backward compatibility (random UUID filename)
- Leading/trailing slashes are automatically stripped from BUCKET_PREFIX
- Update configuration documentation with the new environment variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant