Example #1
0
        public async Task <IActionResult> OnPostDownload(Guid id)
        {
            var stream = await downloadService.GetFile(id);

            var details = reviewService.LoadAnimations().Single(x => x.Id == id);

            if (stream == null || stream.Length == 0)
            {
                ModelState.AddModelError("", "Sikertelen letöltés!");
                return(OnGet());
            }

            return(File(stream, "application/octet-stream", $"{details.Name}.caff"));
        }