From d165c809df9342779ea693e062bebf7a1bb1f4f6 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Mon, 26 Jul 2021 16:54:53 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D1=87=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=94=D0=BE=D0=BA?= =?UTF-8?q?=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Controllers/FileController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsbCloudWebApi/Controllers/FileController.cs b/AsbCloudWebApi/Controllers/FileController.cs index 7a441684..13c2e913 100644 --- a/AsbCloudWebApi/Controllers/FileController.cs +++ b/AsbCloudWebApi/Controllers/FileController.cs @@ -106,7 +106,7 @@ namespace AsbCloudWebApi.Controllers /// id запрашиваемого файла /// Запрашиваемый файл [HttpGet] - [Route("{wellId}/{fileName}")] + [Route("{wellId}/{fileId}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)] public IActionResult GetFile([FromRoute] int wellId, int fileId) { @@ -127,7 +127,7 @@ namespace AsbCloudWebApi.Controllers // TODO: словарь content typoв var relativePath = Path.Combine(fileService.RootPath, $"{wellId}", $"{fileInfo.Value.IdCategory}", - $"{fileInfo.Value.Id}", Path.GetExtension($"{fileInfo.Value.Name}")); + $"{fileInfo.Value.Id}" + Path.GetExtension($"{fileInfo.Value.Name}")); return PhysicalFile(Path.GetFullPath(relativePath), "application/octet-stream", fileInfo.Value.Name); } catch (FileNotFoundException ex)