Skip to content

Commit

Permalink
chore: adding log info for file
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Jan 8, 2025
1 parent 20adfd1 commit 3b2da2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,22 @@ func main() {
return err
}

githubactions.Infof("uploading %s", p)

ct, err := GetContentType(file)
if err != nil {
return err
}

cts := strings.SplitN(ct, ";", 2)
c := strings.TrimSpace(cts[0])

opts := &azblob.UploadFileOptions{
HTTPHeaders: &blob.HTTPHeaders{
BlobContentType: cast.Ptr(strings.TrimSpace(cts[0])),
BlobContentType: cast.Ptr(c),
},
}

githubactions.Infof("uploading %s (%s)", p, c)

_, err = client.UploadFile(ctx, cfg.ContainerName, p, file, opts)
if err != nil {
return err
Expand Down

0 comments on commit 3b2da2b

Please sign in to comment.