From dd746295cc42a8361a61337138819156c98312ee Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 18 Jan 2021 18:38:56 +0100 Subject: [PATCH] s3: fix broken pre-signed URL signature --- .gitlab-ci.yml | 1 - routes/file/file_s3.go | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34d86bc..87375aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,6 @@ test: RABBITMQ_DEFAULT_PASS: villas MINIO_ROOT_USER: minio-villas MINIO_ROOT_PASSWORD: minio-villas - MINIO_DOMAIN: localhost AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER} AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD} S3_BUCKET: villas-web diff --git a/routes/file/file_s3.go b/routes/file/file_s3.go index 95ea322..b51f724 100644 --- a/routes/file/file_s3.go +++ b/routes/file/file_s3.go @@ -116,10 +116,10 @@ func (f *File) getS3Url() (string, error) { svc := s3.New(sess) req, _ := svc.GetObjectRequest(&s3.GetObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(f.Key), - ResponseContentType: aws.String(f.Type), - ResponseContentDisposition: aws.String("attachment; filename=" + f.Name), + Bucket: aws.String(bucket), + Key: aws.String(f.Key), + ResponseContentType: aws.String(f.Type), + // ResponseContentDisposition: aws.String("attachment; filename=" + f.Name), // ResponseContentEncoding: aws.String(), // ResponseContentLanguage: aws.String(), // ResponseCacheControl: aws.String(),