mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:37:22 +01:00
fixes for standard configs
This commit is contained in:
parent
fd23cca840
commit
5b136685db
6 changed files with 8 additions and 88 deletions
|
|
@ -30,7 +30,6 @@ public class FileService : MareSynchronosShared.Protos.FileService.FileServiceBa
|
|||
|
||||
public override async Task<Empty> UploadFile(UploadFileRequest request, ServerCallContext context)
|
||||
{
|
||||
|
||||
var filePath = Path.Combine(_basePath, request.Hash);
|
||||
var file = await _mareDbContext.Files.SingleOrDefaultAsync(f => f.Hash == request.Hash && f.UploaderUID == request.Uploader);
|
||||
if (file != null)
|
||||
|
|
@ -83,7 +82,7 @@ public class FileService : MareSynchronosShared.Protos.FileService.FileServiceBa
|
|||
public override Task<FileSizeResponse> GetFileSizes(FileSizeRequest request, ServerCallContext context)
|
||||
{
|
||||
FileSizeResponse response = new();
|
||||
foreach (var hash in request.Hash)
|
||||
foreach (var hash in request.Hash.Distinct())
|
||||
{
|
||||
FileInfo fi = new(Path.Combine(_basePath, hash));
|
||||
if (fi.Exists)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ public class Startup
|
|||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
app.UseStaticFiles();
|
||||
app.UseHttpLogging();
|
||||
|
||||
app.UseRouting();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://+:5001"
|
||||
},
|
||||
"Gprc": {
|
||||
"Protocols": "Http2",
|
||||
"Url": "http://+:5003"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue