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)