@teamkeel/functions-runtime 0.395.3 → 0.395.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/File.js +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.395.3",
3
+ "version": "0.395.5",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/File.js CHANGED
@@ -168,6 +168,9 @@ class File extends InlineFile {
168
168
  const command = new GetObjectCommand({
169
169
  Bucket: process.env.KEEL_FILES_BUCKET_NAME,
170
170
  Key: "files/" + this.key,
171
+ ResponseContentDisposition: `attachment; filename="${encodeURIComponent(
172
+ this.filename
173
+ )}"`,
171
174
  });
172
175
 
173
176
  const url = await getSignedUrl(s3Client, command, { expiresIn: 60 * 60 });
@@ -213,10 +216,16 @@ async function storeFile(contents, key, filename, contentType, expires) {
213
216
  Key: "files/" + key,
214
217
  Body: contents,
215
218
  ContentType: contentType,
219
+ ContentDisposition: `attachment; filename="${encodeURIComponent(
220
+ filename
221
+ )}"`,
216
222
  Metadata: {
217
223
  filename: filename,
218
224
  },
219
225
  ACL: "private",
226
+ ContentDisposition: `attachment; filename="${encodeURIComponent(
227
+ this.filename
228
+ )}"`,
220
229
  };
221
230
 
222
231
  if (expires) {