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:
@@ -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}"`);
|
||||
|
||||
Reference in New Issue
Block a user