@adminforth/storage-adapter-local 1.0.11 → 1.0.12
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/dist/index.js +3 -1
- package/index.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -276,7 +276,9 @@ class AdminForthStorageAdapterLocalFilesystem {
|
|
|
276
276
|
}, (err) => {
|
|
277
277
|
if (err) {
|
|
278
278
|
afLogger.error(`Could not send file ${filePath}: ${err}`);
|
|
279
|
-
res.
|
|
279
|
+
if (!res.headersSent) {
|
|
280
|
+
res.status(500).send("Could not send file");
|
|
281
|
+
}
|
|
280
282
|
}
|
|
281
283
|
});
|
|
282
284
|
}));
|
package/index.ts
CHANGED
|
@@ -316,7 +316,10 @@ export default class AdminForthStorageAdapterLocalFilesystem implements StorageA
|
|
|
316
316
|
(err) => {
|
|
317
317
|
if (err) {
|
|
318
318
|
afLogger.error(`Could not send file ${filePath}: ${err}`);
|
|
319
|
-
|
|
319
|
+
|
|
320
|
+
if (!res.headersSent) {
|
|
321
|
+
res.status(500).send("Could not send file");
|
|
322
|
+
}
|
|
320
323
|
}
|
|
321
324
|
}
|
|
322
325
|
);
|