public async Task <IList <BaseFileDto> > Handle(GetMultipleFilesByIdsQuery request, CancellationToken cancellationToken)
        {
            List <BaseFileDto> fileDtos = (await _fileReadRepository.GetResizedFileByIdQueryAsync(request.Ids)).ToList();

            if (fileDtos != null)
            {
                foreach (var file in fileDtos)
                {
                    if (file != null)
                    {
                        string rootDataFolder = _configuration.RootDataFolder;
                        string cloudDataUrl   = _configuration.CloudDataUrl;

                        string fileName = file.FilePath.Replace(rootDataFolder, string.Empty);
                        file.CloudUrl = PathHelper.CombineUrl(cloudDataUrl, fileName);
                    }
                }
            }

            return(fileDtos);
        }
Ejemplo n.º 2
0
 public async Task <IList <BaseFileDto> > GetResizedFileByIdQueryAsync(IEnumerable <long> ids)
 {
     return(await _fileReadRepository.GetResizedFileByIdQueryAsync(ids));
 }