summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/FileServerService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-09-18 23:36:00 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-09-18 23:36:00 +0900
commit2fbd09a07e3cdabee5104c7fcb27f27efd6f79a4 (patch)
tree1a1b6f437d7cde46b1974bc37938699b6b5533b5 /packages/backend/src/server/FileServerService.ts
parenttypo (diff)
downloadsharkey-2fbd09a07e3cdabee5104c7fcb27f27efd6f79a4.tar.gz
sharkey-2fbd09a07e3cdabee5104c7fcb27f27efd6f79a4.tar.bz2
sharkey-2fbd09a07e3cdabee5104c7fcb27f27efd6f79a4.zip
fix
Diffstat (limited to 'packages/backend/src/server/FileServerService.ts')
-rw-r--r--packages/backend/src/server/FileServerService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts
index 4db9205e36..e2b0ea5afe 100644
--- a/packages/backend/src/server/FileServerService.ts
+++ b/packages/backend/src/server/FileServerService.ts
@@ -172,7 +172,7 @@ export class FileServerService {
ctx.set('Content-Disposition', contentDisposition('inline', filename));
} else {
const readable = this.internalStorageService.read(file.accessKey!);
- readable.on('error', commonReadableHandlerGenerator(ctx));
+ readable.on('error', this.commonReadableHandlerGenerator(ctx));
ctx.body = readable;
ctx.set('Content-Type', FILE_TYPE_BROWSERSAFE.includes(file.type) ? file.type : 'application/octet-stream');
ctx.set('Cache-Control', 'max-age=31536000, immutable');