feat(files): add file management UI for scenarios and runs

- add scenario upload and download UI with typed file API helpers
- show run artifacts on run detail pages after polling completes
- handle multipart uploads and absolute file paths for downloads
This commit is contained in:
2026-04-21 15:58:04 +03:00
parent 6a91ce30e3
commit 86f9ac5603
20 changed files with 1237 additions and 96 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import {
NotFoundException,
} from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";
import * as path from "path";
import { Like, Repository } from "typeorm";
import {
PaginatedResult,
@@ -755,7 +756,7 @@ export class ScenarioService {
}
const file = link.file;
const fullPath = this.fileStorageService.getAbsolutePath(file.filePath);
const fullPath = path.resolve(this.fileStorageService.getAbsolutePath(file.filePath));
res.setHeader("Content-Type", file.mimeType);
res.setHeader("Content-Disposition", `inline; filename="${file.originalName}"`);
@@ -818,7 +819,7 @@ export class ScenarioService {
}
const file = link.file;
const fullPath = this.fileStorageService.getAbsolutePath(file.filePath);
const fullPath = path.resolve(this.fileStorageService.getAbsolutePath(file.filePath));
res.setHeader("Content-Type", file.mimeType);
res.setHeader("Content-Disposition", `inline; filename="${file.originalName}"`);