diff --git a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs index 40bc443d..34785c39 100644 --- a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs @@ -17,6 +17,7 @@ using IRaCIS.Core.Infrastructure; using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp; using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Authorization; namespace IRaCIS.Core.Application.Contracts { @@ -211,7 +212,7 @@ namespace IRaCIS.Core.Application.Contracts return await _repository.Where(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId).ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync(); } - + [AllowAnonymous] [HttpGet] public async Task NoneDicomFilePreview(string relativePath) { @@ -225,19 +226,19 @@ namespace IRaCIS.Core.Application.Contracts var storePreviewPath = _fileStorePath + ".preview.jpeg"; - if (!File.Exists(storePreviewPath)) - { + //if (!File.Exists(storePreviewPath)) + //{ using (var image = SixLabors.ImageSharp.Image.Load(await File.ReadAllBytesAsync(_fileStorePath))) { image.Mutate(x => x - .Resize(image.Width / 2, image.Height / 2) + .Resize(400, 400) ); await image.SaveAsJpegAsync(storePreviewPath); } - } + //} return new FileContentResult(await File.ReadAllBytesAsync(storePreviewPath), "image/jpeg");