|
|
@@ -190,7 +190,6 @@ class AwsFileUploader extends AbstractFileUploader {
|
|
|
throw new Error('AWS is not configured.');
|
|
|
}
|
|
|
|
|
|
- const isDownload = opts?.download ?? false;
|
|
|
|
|
|
const s3 = S3Factory();
|
|
|
const awsConfig = getAwsConfig();
|
|
|
@@ -199,13 +198,13 @@ class AwsFileUploader extends AbstractFileUploader {
|
|
|
|
|
|
// issue signed url (default: expires 120 seconds)
|
|
|
// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property
|
|
|
- const contentHeaders = new ContentHeaders(attachment, { inline: !isDownload });
|
|
|
- const { contentType, contentDisposition } = contentHeaders;
|
|
|
+ // const isDownload = opts?.download ?? false;
|
|
|
+ // const contentHeaders = new ContentHeaders(attachment, { inline: !isDownload });
|
|
|
const params: GetObjectCommandInput = {
|
|
|
Bucket: awsConfig.bucket,
|
|
|
Key: filePath,
|
|
|
- ResponseContentType: contentType?.value.toString(),
|
|
|
- ResponseContentDisposition: contentDisposition?.value.toString(),
|
|
|
+ // ResponseContentType: contentHeaders.contentType?.value.toString(),
|
|
|
+ // ResponseContentDisposition: contentHeaders.contentDisposition?.value.toString(),
|
|
|
};
|
|
|
const signedUrl = await getSignedUrl(s3, new GetObjectCommand(params), {
|
|
|
expiresIn: lifetimeSecForTemporaryUrl,
|