Merge branch 'dev' into feature/notifications_updates

This commit is contained in:
commit e3992f3d4c
6 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ public class AutoGeneratedDailyReportController : ControllerBase
reportDate,
cancellationToken);
return File(reportFile.stream, reportFile.fileName);
return File(reportFile.stream, "application/octet-stream", reportFile.fileName);
}
/// <summary>

View File

@ -162,7 +162,7 @@ namespace AsbCloudWebApi.Controllers
/// <param name="token"></param>
/// <returns></returns>
[HttpGet("{date}/excel")]
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task<IActionResult> DownloadAsync(int idWell, DateOnly date, CancellationToken token)
{
@ -177,7 +177,7 @@ namespace AsbCloudWebApi.Controllers
return NoContent();
var fileName = $"Суточный рапорт по скважине {well.Caption} куст {well.Cluster}.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}

View File

@ -49,7 +49,7 @@ namespace AsbCloudWebApi.Controllers
{
var stream = plannedTrajectoryImportService.GetTemplateFile();
var fileName = "ЕЦП_шаблон_файла_плановая_траектория.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
/// <summary>
@ -68,7 +68,7 @@ namespace AsbCloudWebApi.Controllers
return Forbid();
var stream = await plannedTrajectoryImportService.ExportAsync(idWell, token);
var fileName = await plannedTrajectoryImportService.GetFileNameAsync(idWell, token);
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
/// <summary>

View File

@ -170,7 +170,7 @@ namespace AsbCloudWebApi.Controllers
{
var stream = await processMapPlanImportService.GetExcelTemplateStreamAsync(cancellationToken);
var fileName = "ЕЦП_шаблон_файла_РТК.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
/// <summary>
@ -236,7 +236,7 @@ namespace AsbCloudWebApi.Controllers
var stream = await processMapPlanImportService.ExportAsync(idWell, cancellationToken);
var fileName = $"РТК-план по скважине {well.Caption} куст {well.Cluster}.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
private async Task NotifyUsersBySignalR(int idWell, CancellationToken token)

View File

@ -60,7 +60,7 @@ namespace AsbCloudWebApi.Controllers.SAUB
var stream = await telemetryDataSaubService.GetZippedCsv(idWell, beginDate, endDate, token).ConfigureAwait(false);
var fileName = $"DataSaub idWell{idWell} {beginDate:yyyy-MM-DDTHH-mm} - {endDate:yyyy-MM-DDTHH-mm}.zip";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
}
}

View File

@ -333,7 +333,7 @@ namespace AsbCloudWebApi.Controllers
var stream = wellOperationImportService.Export(idWell);
var fileName = await wellService.GetWellCaptionByIdAsync(idWell, token) + "_operations.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
/// <summary>
@ -373,7 +373,7 @@ namespace AsbCloudWebApi.Controllers
{
var stream = wellOperationImportService.GetExcelTemplateStream();
var fileName = "ЕЦП_шаблон_файла_операций.xlsx";
return File(stream, fileName);
return File(stream, "application/octet-stream", fileName);
}
private async Task<bool> CanUserAccessToWellAsync(int idWell, CancellationToken token)