|
@@ -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)}`);
|
|
|
}
|