diff options
-rw-r--r-- | backend/api/api/Controllers/FileController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/api/api/Controllers/FileController.cs b/backend/api/api/Controllers/FileController.cs index ead9ee9a..05694166 100644 --- a/backend/api/api/Controllers/FileController.cs +++ b/backend/api/api/Controllers/FileController.cs @@ -15,7 +15,7 @@ namespace api.Controllers [ApiController] public class FileController : ControllerBase { - private string[] permittedExtensions = { ".csv" }; + private string[] permittedExtensions = { ".csv",".json",".xls",".xlsx" }; private string[] permittedExtensionsH5 = { ".h5" };//niz da bi dodali h4 itd private readonly IConfiguration _configuration; private readonly IFileService _fileService; @@ -190,7 +190,7 @@ namespace api.Controllers await file.CopyToAsync(stream); } FileModel fileModel= new FileModel(); - fileModel.type = "csv"; + fileModel.type = ext; fileModel.path=fullPath; fileModel.uploaderId= uploaderId; fileModel.date = DateTime.Now.ToUniversalTime(); |