File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "strings"
1313
1414 "github.com/aws/aws-sdk-go-v2/service/s3"
15+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
1516 "github.com/google/go-github/v82/github"
1617 "github.com/google/uuid"
1718
@@ -197,11 +198,13 @@ func (s *Server) logoHandler(w http.ResponseWriter, r *http.Request) {
197198 "key" , s3Key ,
198199 "content_type" , contentType )
199200
201+ acl := types .ObjectCannedACLPublicRead
200202 putInput := & s3.PutObjectInput {
201203 Bucket : & s .bucketName ,
202204 Key : & s3Key ,
203205 Body : bytes .NewReader (fileData ),
204206 ContentType : & contentType ,
207+ ACL : acl ,
205208 }
206209
207210 _ , err := s .s3Client .PutObject (r .Context (), putInput )
@@ -211,7 +214,7 @@ func (s *Server) logoHandler(w http.ResponseWriter, r *http.Request) {
211214 return
212215 }
213216
214- logoURL = fmt .Sprintf ("https://%s.s3.amazonaws.com /%s" , s .bucketName , s3Key )
217+ logoURL = fmt .Sprintf ("https://%s.t3.storage.dev /%s" , s .bucketName , s3Key )
215218 slog .Info ("logoHandler: uploaded to S3" ,
216219 "user_id" , user .ID ,
217220 "url" , logoURL ,
You can’t perform that action at this time.
0 commit comments