fix(media): correct route param handling in media controller
All checks were successful
Backend Tests / test (push) Successful in 1m48s
Lint / lint (backend) (push) Successful in 1m7s
Lint / lint (documentation) (push) Successful in 1m7s
Lint / lint (frontend) (push) Successful in 1m8s
Backend Tests / test (pull_request) Successful in 1m10s
Lint / lint (backend) (pull_request) Successful in 1m8s
Lint / lint (documentation) (pull_request) Successful in 1m7s
Lint / lint (frontend) (pull_request) Successful in 1m9s
All checks were successful
Backend Tests / test (push) Successful in 1m48s
Lint / lint (backend) (push) Successful in 1m7s
Lint / lint (documentation) (push) Successful in 1m7s
Lint / lint (frontend) (push) Successful in 1m8s
Backend Tests / test (pull_request) Successful in 1m10s
Lint / lint (backend) (pull_request) Successful in 1m8s
Lint / lint (documentation) (pull_request) Successful in 1m7s
Lint / lint (frontend) (pull_request) Successful in 1m9s
Adjust `@Get` decorator route pattern to properly handle file keys with special characters.
This commit is contained in:
@@ -6,7 +6,7 @@ import { S3Service } from "../s3/s3.service";
|
|||||||
export class MediaController {
|
export class MediaController {
|
||||||
constructor(private readonly s3Service: S3Service) {}
|
constructor(private readonly s3Service: S3Service) {}
|
||||||
|
|
||||||
@Get(":key(*)")
|
@Get("*key")
|
||||||
async getFile(@Param("key") key: string, @Res() res: Response) {
|
async getFile(@Param("key") key: string, @Res() res: Response) {
|
||||||
try {
|
try {
|
||||||
const stats = await this.s3Service.getFileInfo(key);
|
const stats = await this.s3Service.getFileInfo(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user