1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00

fix: use correct filename for GCS downloads (#1625)

This commit is contained in:
Adam Bouqdib 2020-06-24 18:19:20 +01:00 committed by GitHub
parent fd7dbf6592
commit 10c9d39d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,10 +229,13 @@ func (u *productionUploader) Open(ctx *context.Context, bucket string) error {
return nil
}
func (u *productionUploader) Upload(ctx *context.Context, path string, data []byte) (err error) {
log.WithField("path", path).Info("uploading")
func (u *productionUploader) Upload(ctx *context.Context, filepath string, data []byte) (err error) {
log.WithField("path", filepath).Info("uploading")
w, err := u.bucket.NewWriter(ctx, path, nil)
opts := &blob.WriterOptions{
ContentDisposition: "attachment; filename=" + path.Base(filepath),
}
w, err := u.bucket.NewWriter(ctx, filepath, opts)
if err != nil {
return err
}