lrf преди 1 година
родител
ревизия
5a68819dc8
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/controller/file.controller.ts

+ 1 - 1
src/controller/file.controller.ts

@@ -57,7 +57,7 @@ export class FileController {
   @Get('/files/*')
   async readFile() {
     const shortRealPath = this.fileService.getFileShortRealPath();
-    const realPath = join(process.cwd(), this.uploadDir, shortRealPath);
+    const realPath = join(this.uploadDir, shortRealPath);
     this.ctx.body = createReadStream(realPath);
     this.ctx.response.set('content-type', `/files/${getType(realPath)}`);
   }