Ejemplo n.º 1
0
        public IActionResult DownloadLogFile(string logName)
        {
            var response = _logsService.GetLogsFileBytes(logName);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                string zipName  = $"{logName}.txt";
                string mimeType = System.Net.Mime.MediaTypeNames.Application.Octet;

                return(new FileContentResult(response.Payload, mimeType)
                {
                    FileDownloadName = zipName
                });
            }
            return(SendResponse(response));
        }