コード例 #1
0
        public async Task <IActionResult> GetPhotoFile(Guid id)
        {
            var photoContent = await photosRepository.GetPhotoContentAsync(id);

            if (photoContent == null)
            {
                return(NotFound());
            }

            return(File(photoContent.Content, photoContent.ContentType, photoContent.FileName));
        }