#24 upload limit in configration

This commit is contained in:
Hamid Reza Mohammadi 2020-10-23 12:29:44 +03:30
parent a78cff9e1f
commit 0b3a30d55d
3 changed files with 8 additions and 2 deletions

View File

@ -28,7 +28,7 @@ namespace RMuseum.Services.Implementation
try
{
SqliteConnectionStringBuilder connectionStringBuilder = new SqliteConnectionStringBuilder();
connectionStringBuilder.DataSource = @"C:\Users\moham\AppData\Local\ganjoor\ganjoor.s3db";
connectionStringBuilder.DataSource = Configuration.GetSection("LocalSqliteImport")["FilePath"];
using (SqliteConnection sqliteConnection = new SqliteConnection(connectionStringBuilder.ToString()))
{
await sqliteConnection.OpenAsync();

View File

@ -260,7 +260,7 @@ namespace RMuseum
//upload limit for IIS
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodySize = 52428800; //50MB
options.MaxRequestBodySize = int.Parse(Configuration.GetSection("IIS")["UploadLimit"]);
});

View File

@ -33,6 +33,12 @@
"Password": "password",
"From": "test@gmail.com"
},
"LocalSqliteImport": {
"FilePath": "C:\\Users\\moham\\AppData\\Local\\ganjoor\\ganjoor.s3db"
},
"IIS": {
"UploadLimit": "52428800"
},
"AudioMySqlServer": {
"Server": "localhost",
"Username": "adab",