Пример #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            using (var memoryStream = new MemoryStream())
            {
                await UploadFileDto.File.CopyToAsync(memoryStream);

                await _fileAppService.SaveFileAsync(
                    new SaveFileInputDto
                {
                    Name    = UploadFileDto.Name,
                    Content = memoryStream.ToArray()
                }
                    );
            }

            return(Page());
        }