diff --git a/AsbCloudWebApi/Controllers/FileController.cs b/AsbCloudWebApi/Controllers/FileController.cs
index 713b3731..e9a7990b 100644
--- a/AsbCloudWebApi/Controllers/FileController.cs
+++ b/AsbCloudWebApi/Controllers/FileController.cs
@@ -17,7 +17,7 @@ namespace AsbCloudWebApi.Controllers
///
[Route("api/well/{idWell}/files")]
[ApiController]
- //[Authorize]
+ [Authorize]
public class FileController : ControllerBase
{
private readonly FileService fileService;
@@ -39,7 +39,7 @@ namespace AsbCloudWebApi.Controllers
/// Токен отмены задачи
///
[HttpPost]
- //[Permission]
+ [Permission]
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
public async Task SaveFilesAsync(int idWell, int idCategory,
[FromForm] IFormFileCollection files, [FromServices] IUserRepository userRepository, CancellationToken token)
@@ -60,7 +60,7 @@ namespace AsbCloudWebApi.Controllers
foreach (var file in files)
{
var fileStream = file.OpenReadStream();
- await fileService.SaveAsync(idWell, idUser ?? 1, idCategory, file.FileName,
+ await fileService.SaveAsync(idWell, idUser ?? 0, idCategory, file.FileName,
fileStream, token).ConfigureAwait(false);
}