예제 #1
0
        public async Task <IActionResult> Download(int id)
        {
            if (id <= 0)
            {
                return(new BadRequestObjectResult(new Response("Invalid analysis id.")));
            }

            var stream = new MemoryStream();

            await _analysisService.ArchiveAnalysis(id, stream);

            return(File(stream, "application/zip", $"Analysis {id}.zip"));
        }