Skip to content

Commit 756aa41

Browse files
author
novnc
committed
refactor: enhance S3 initialization logging; remove bucket validation
1 parent 35f36c6 commit 756aa41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ func s3GetPresignedUrl(key string) (string, error) {
232232

233233
// initS3 initializes the S3 client from environment variables.
234234
func initS3() error {
235-
if s3Bucket == "" {
236-
return fmt.Errorf("BUCKET environment variable must be set")
237-
}
238-
239235
var cfgOpts []func(*config.LoadOptions) error
240236
// If the AWS_REGION is explicitly set, use it.
241237
if s3Region != "" {
@@ -255,6 +251,11 @@ func initS3() error {
255251
}
256252

257253
log.Printf("S3 client configured for region: %s", cfg.Region)
254+
log.Printf("S3 bucket set: %s", s3Bucket)
255+
256+
if s3Prefix != "" {
257+
log.Printf("S3 prefix set: %s", s3Prefix)
258+
}
258259

259260
if s3Prefix != "" && !strings.HasSuffix(s3Prefix, "/") {
260261
s3Prefix += "/"

0 commit comments

Comments
 (0)