aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/api/api/Controllers/FileController.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/backend/api/api/Controllers/FileController.cs b/backend/api/api/Controllers/FileController.cs
index fb3df61a..8c47dc4f 100644
--- a/backend/api/api/Controllers/FileController.cs
+++ b/backend/api/api/Controllers/FileController.cs
@@ -155,6 +155,17 @@ namespace api.Controllers
return Ok(fileModel);
}
+ [HttpGet("DownloadTemp")]
+ public async Task<ActionResult> DownloadTemp(string id)
+ {
+ string filePath = _fileservice.GetFilePath(id,"");
+ if (filePath == null)
+ return BadRequest();
+
+ return File(System.IO.File.ReadAllBytes(filePath), "application/octet-stream", Path.GetFileName(filePath));
+
+ }
+
}