@teamkeel/functions-runtime 0.394.1 → 0.395.0

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 +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.394.1",
3
+ "version": "0.395.0",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/File.js CHANGED
@@ -195,7 +195,11 @@ async function storeFile(contents, key, filename, contentType, expires) {
195
195
  };
196
196
 
197
197
  if (expires) {
198
- params.Expires = expires;
198
+ if (expires instanceof Date) {
199
+ params.Expires = expires;
200
+ } else {
201
+ console.warn("Invalid expires value. Skipping Expires parameter.");
202
+ }
199
203
  }
200
204
 
201
205
  const command = new PutObjectCommand(params);
@@ -206,7 +210,6 @@ async function storeFile(contents, key, filename, contentType, expires) {
206
210
  throw error;
207
211
  }
208
212
  } else {
209
- // default to db storage
210
213
  const db = useDatabase();
211
214
 
212
215
  try {