@@ -190,7 +190,8 @@ func UploadStaticAssets(ctx context.Context, s3Client *s3.Client, staticAssetsBu
|
|||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "static-email-asset",
|
"type": "static-email-asset",
|
||||||
},
|
},
|
||||||
ContentType: aws.String(mimeType),
|
ContentType: aws.String(mimeType),
|
||||||
|
CacheControl: aws.String("max-age=3600, public"),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -129,11 +129,12 @@ func (s *Service) PutFile(
|
|||||||
_, err := s.s3Client.PutObject(
|
_, err := s.s3Client.PutObject(
|
||||||
ctx,
|
ctx,
|
||||||
&s3.PutObjectInput{
|
&s3.PutObjectInput{
|
||||||
Bucket: aws.String(file.GetBucketName()),
|
Bucket: aws.String(file.GetBucketName()),
|
||||||
Key: aws.String(file.GetObjectKey()),
|
Key: aws.String(file.GetObjectKey()),
|
||||||
Body: content,
|
Body: content,
|
||||||
ContentType: aws.String(file.GetMimeType()),
|
ContentType: aws.String(file.GetMimeType()),
|
||||||
Metadata: metadata,
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
|
Metadata: metadata,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -347,10 +347,11 @@ func (s AuditService) UploadReport(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: aws.String(s.svc.bucket),
|
Bucket: aws.String(s.svc.bucket),
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: req.File.Content,
|
Body: req.File.Content,
|
||||||
ContentType: aws.String(req.File.ContentType),
|
ContentType: aws.String(req.File.ContentType),
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"report-id": reportID.String(),
|
"report-id": reportID.String(),
|
||||||
|
|||||||
@@ -1792,6 +1792,7 @@ func (s *DocumentService) BuildAndUploadExport(ctx context.Context, exportJobID
|
|||||||
Body: tempFile,
|
Body: tempFile,
|
||||||
ContentLength: ref.Ref(fileInfo.Size()),
|
ContentLength: ref.Ref(fileInfo.Size()),
|
||||||
ContentType: ref.Ref("application/zip"),
|
ContentType: ref.Ref("application/zip"),
|
||||||
|
CacheControl: ref.Ref("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "document-export",
|
"type": "document-export",
|
||||||
"export-job-id": exportJob.ID.String(),
|
"export-job-id": exportJob.ID.String(),
|
||||||
|
|||||||
@@ -96,11 +96,12 @@ func (s FileService) UploadAndSaveFile(
|
|||||||
_, err = s.svc.s3.PutObject(
|
_, err = s.svc.s3.PutObject(
|
||||||
ctx,
|
ctx,
|
||||||
&s3.PutObjectInput{
|
&s3.PutObjectInput{
|
||||||
Bucket: &s.svc.bucket,
|
Bucket: &s.svc.bucket,
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: req.Content,
|
Body: req.Content,
|
||||||
Metadata: s3Metadata,
|
Metadata: s3Metadata,
|
||||||
ContentType: aws.String(mimeType),
|
ContentType: aws.String(mimeType),
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -729,6 +729,7 @@ func (s *FrameworkService) BuildAndUploadExport(ctx context.Context, exportJobID
|
|||||||
Body: tempFile,
|
Body: tempFile,
|
||||||
ContentLength: ref.Ref(fileInfo.Size()),
|
ContentLength: ref.Ref(fileInfo.Size()),
|
||||||
ContentType: ref.Ref("application/zip"),
|
ContentType: ref.Ref("application/zip"),
|
||||||
|
CacheControl: ref.Ref("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "framework-export",
|
"type": "framework-export",
|
||||||
"export-job-id": exportJob.ID.String(),
|
"export-job-id": exportJob.ID.String(),
|
||||||
|
|||||||
@@ -375,10 +375,11 @@ func (s TrustCenterFileService) uploadFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: aws.String(s.svc.bucket),
|
Bucket: aws.String(s.svc.bucket),
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: fileContent,
|
Body: fileContent,
|
||||||
ContentType: aws.String(contentType),
|
ContentType: aws.String(contentType),
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "trust-center-file",
|
"type": "trust-center-file",
|
||||||
"trust-center-file-id": trustCenterFileID.String(),
|
"trust-center-file-id": trustCenterFileID.String(),
|
||||||
|
|||||||
@@ -395,10 +395,11 @@ func (s TrustCenterReferenceService) uploadLogoFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: aws.String(s.svc.bucket),
|
Bucket: aws.String(s.svc.bucket),
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: fileContent,
|
Body: fileContent,
|
||||||
ContentType: aws.String(contentType),
|
ContentType: aws.String(contentType),
|
||||||
|
CacheControl: aws.String("max-age=3600, public"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "trust-center-reference-logo",
|
"type": "trust-center-reference-logo",
|
||||||
"trust-center-reference-id": referenceID.String(),
|
"trust-center-reference-id": referenceID.String(),
|
||||||
|
|||||||
@@ -231,10 +231,11 @@ func (s TrustCenterService) UploadNDA(
|
|||||||
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
||||||
|
|
||||||
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: &s.svc.bucket,
|
Bucket: &s.svc.bucket,
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: req.File,
|
Body: req.File,
|
||||||
ContentType: &mimeType,
|
ContentType: &mimeType,
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "trust-center-nda",
|
"type": "trust-center-nda",
|
||||||
"trust-center-id": req.TrustCenterID.String(),
|
"trust-center-id": req.TrustCenterID.String(),
|
||||||
@@ -408,10 +409,11 @@ func (s TrustCenterService) uploadFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err = s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: &s.svc.bucket,
|
Bucket: &s.svc.bucket,
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: fileUpload.Content,
|
Body: fileUpload.Content,
|
||||||
ContentType: &mimeType,
|
ContentType: &mimeType,
|
||||||
|
CacheControl: aws.String("max-age=3600, public"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": fileType,
|
"type": fileType,
|
||||||
"trust-center-id": trustCenter.ID.String(),
|
"trust-center-id": trustCenter.ID.String(),
|
||||||
|
|||||||
@@ -126,10 +126,11 @@ func (s VendorBusinessAssociateAgreementService) Upload(
|
|||||||
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
||||||
|
|
||||||
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: &s.svc.bucket,
|
Bucket: &s.svc.bucket,
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: req.File,
|
Body: req.File,
|
||||||
ContentType: &mimeType,
|
ContentType: &mimeType,
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "vendor-business-associate-agreement",
|
"type": "vendor-business-associate-agreement",
|
||||||
"vendor-id": vendorID.String(),
|
"vendor-id": vendorID.String(),
|
||||||
|
|||||||
@@ -126,10 +126,11 @@ func (s VendorDataPrivacyAgreementService) Upload(
|
|||||||
|
|
||||||
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
mimeType := mime.TypeByExtension(filepath.Ext(req.FileName))
|
||||||
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
_, err := s.svc.s3.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: &s.svc.bucket,
|
Bucket: &s.svc.bucket,
|
||||||
Key: aws.String(objectKey.String()),
|
Key: aws.String(objectKey.String()),
|
||||||
Body: req.File,
|
Body: req.File,
|
||||||
ContentType: &mimeType,
|
ContentType: &mimeType,
|
||||||
|
CacheControl: aws.String("private, max-age=3600"),
|
||||||
Metadata: map[string]string{
|
Metadata: map[string]string{
|
||||||
"type": "vendor-data-privacy-agreement",
|
"type": "vendor-data-privacy-agreement",
|
||||||
"vendor-id": vendorID.String(),
|
"vendor-id": vendorID.String(),
|
||||||
|
|||||||
Reference in New Issue
Block a user