forked from ddrilling/AsbCloudServer
Merge pull request 'feature/27778811-file-storage Переместить файловое хранилище из директории с программой' (#196) from feature/27778811-file-storage into dev
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/196
This commit is contained in:
commit
e027e27b5c
3
.gitignore
vendored
3
.gitignore
vendored
@ -339,4 +339,5 @@ ASALocalRun/
|
|||||||
.localhistory/
|
.localhistory/
|
||||||
|
|
||||||
# BeatPulse healthcheck temp database
|
# BeatPulse healthcheck temp database
|
||||||
healthchecksdb
|
healthchecksdb
|
||||||
|
data/
|
@ -6,6 +6,8 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Repository;
|
namespace AsbCloudInfrastructure.Repository;
|
||||||
|
|
||||||
@ -14,10 +16,13 @@ public class FileStorageRepository : IFileStorageRepository
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Директория хранения файлов
|
/// Директория хранения файлов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly string RootPath = "files";
|
|
||||||
|
|
||||||
public FileStorageRepository()
|
public string RootPath { get; }
|
||||||
|
|
||||||
|
|
||||||
|
public FileStorageRepository(IConfiguration configuration)
|
||||||
{
|
{
|
||||||
|
RootPath = configuration.GetValue<string>("ContentPath") ?? "../data";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SaveFileAsync(string filePathRec, Stream fileStreamSrc, CancellationToken token)
|
public async Task SaveFileAsync(string filePathRec, Stream fileStreamSrc, CancellationToken token)
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
"LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
|
"LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
//"userLimits": {
|
"ContentPath": "../data",
|
||||||
// "parallelRequestsToController": 5
|
|
||||||
//},
|
|
||||||
"email": {
|
"email": {
|
||||||
"smtpServer": "smtp.timeweb.ru",
|
"smtpServer": "smtp.timeweb.ru",
|
||||||
"sender": "bot@digitaldrilling.ru",
|
"sender": "bot@digitaldrilling.ru",
|
||||||
@ -28,28 +26,5 @@
|
|||||||
},
|
},
|
||||||
"DirectoryNameHelpPageFiles": "helpPages",
|
"DirectoryNameHelpPageFiles": "helpPages",
|
||||||
"DirectoryManualFiles": "manuals",
|
"DirectoryManualFiles": "manuals",
|
||||||
"Urls": "http://0.0.0.0:5000" //;https://0.0.0.0:5001" //,
|
"Urls": "http://0.0.0.0:5000"
|
||||||
// See https man: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-6.0
|
|
||||||
//"Kestrel": {
|
|
||||||
// "Endpoints": {
|
|
||||||
// "Http": {
|
|
||||||
// "Url": "http://0.0.0.0:5000"
|
|
||||||
// },
|
|
||||||
// "Https": {
|
|
||||||
// "Url": "https://0.0.0.0:5001",
|
|
||||||
// "Certificate": {
|
|
||||||
// // use store
|
|
||||||
// "Subject": "localhost",
|
|
||||||
// "Store": "My",
|
|
||||||
// "Location": "CurrentUser",
|
|
||||||
// "AllowInvalid": true
|
|
||||||
|
|
||||||
// // use file
|
|
||||||
// "Path": "<path to .pem/.crt file>",
|
|
||||||
// "KeyPath": "<path to .key file>",
|
|
||||||
// "Password": "<certificate password>"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user