This commit is contained in:
2021-03-16 15:15:13 +00:00
parent 055b9e77c3
commit 9236c91ff6
2 changed files with 3 additions and 2 deletions

2
.vscode/launch.json vendored
View File

@@ -49,7 +49,7 @@
//TRANSLATION MUST BE en for Integration TESTING //TRANSLATION MUST BE en for Integration TESTING
//"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true", //"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;", "AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;",
// "AYANOVA_USE_URLS": "http://*:7575;", "AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", "AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",

View File

@@ -211,7 +211,8 @@ namespace AyaNova.Api.Controllers
[Authorize] [Authorize]
[HttpPost] [HttpPost]
[DisableFormValueModelBinding] [DisableFormValueModelBinding]
[RequestSizeLimit(10737418241)]//10737418240 = 10gb https://github.com/aspnet/Announcements/issues/267 // [RequestSizeLimit(10737418241)]//10737418240 = 10gb https://github.com/aspnet/Announcements/issues/267
[RequestSizeLimit(1048576)]//1048576 = 1mb for testing
public async Task<IActionResult> UploadAsync() public async Task<IActionResult> UploadAsync()
{ {
//Adapted from the example found here: https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads#uploading-large-files-with-streaming //Adapted from the example found here: https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads#uploading-large-files-with-streaming