Exemplo n.º 1
0
        public async Task <IActionResult> DownloadAttachment(int id)
        {
            try
            {
                var file = await _service.DownloadMrrSupplierAttachment(id).ConfigureAwait(false);

                return(File(file.Content, file.ContentType, file.FileName));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }