@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.
- package/package.json +1 -1
- package/src/File.js +5 -2
package/package.json
CHANGED
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
|
-
|
|
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 {
|