From 1ab8ae89ac0e2e6ed280069ab8650e11dddb2b90 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Tue, 27 Jul 2021 17:27:05 +0500 Subject: [PATCH] Reports download fix --- AsbCloudWebApi/Controllers/ReportController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AsbCloudWebApi/Controllers/ReportController.cs b/AsbCloudWebApi/Controllers/ReportController.cs index 13b15eff..a5d5f0a0 100644 --- a/AsbCloudWebApi/Controllers/ReportController.cs +++ b/AsbCloudWebApi/Controllers/ReportController.cs @@ -102,7 +102,8 @@ namespace AsbCloudWebApi.Controllers if (!wellService.IsCompanyOwnsWell((int)idCompany, idWell)) return Forbid(); // TODO: словарь content typoв - var relativePath = Path.Combine(fileService.RootPath, $"{idWell}", reportName); + var relativePath = Path.Combine(fileService.RootPath, $"{idWell}", + $"{reportService.ReportCategoryId}", reportName); return PhysicalFile(Path.GetFullPath(relativePath), "application/pdf", reportName); } catch (FileNotFoundException ex)