This commit is contained in:
2023-07-27 15:31:03 +02:00
parent 55b1747109
commit 4344938a85
4 changed files with 7 additions and 9 deletions

View File

@@ -56,6 +56,5 @@ public static class DependencyInjection
.AddCommands() .AddCommands()
.AddTransient<CreateContainerCommand>() .AddTransient<CreateContainerCommand>()
.AddTransient<CreateElementCommand>() .AddTransient<CreateElementCommand>()
.AddTransient<CopyCommand>()
.AddTransient<DeleteCommand>(); .AddTransient<DeleteCommand>();
} }

View File

@@ -29,7 +29,7 @@ public class RemoteContentWriter : IRemoteContentWriter
_remoteConnection.CloseWriterAsync(_transactionId); _remoteConnection.CloseWriterAsync(_transactionId);
} }
public int PreferredBufferSize => 10 * 1024; public int PreferredBufferSize => 10 * 1024 * 1024;
public async Task WriteBytesAsync(byte[] data, int? index = null) public async Task WriteBytesAsync(byte[] data, int? index = null)
{ {

View File

@@ -1,12 +1,8 @@
using System.Net; using System.Net;
using Autofac;
using Autofac.Extensions.DependencyInjection; using Autofac.Extensions.DependencyInjection;
using FileTime.Server.Common; using FileTime.Server.Common;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpLogging; using Microsoft.AspNetCore.HttpLogging;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@@ -44,7 +40,10 @@ public class Program
}); });
builder.Services.AddHttpLogging(options => options.LoggingFields = HttpLoggingFields.All); builder.Services.AddHttpLogging(options => options.LoggingFields = HttpLoggingFields.All);
builder.Services.AddSignalR(); builder.Services.AddSignalR(hubOptions =>
{
hubOptions.MaximumReceiveMessageSize = 20 * 1024 * 1024; // 10MB
});
builder.Services.AddHealthChecks(); builder.Services.AddHealthChecks();
builder.Services.AddHostedService<PortWriterService>(); builder.Services.AddHostedService<PortWriterService>();

View File

@@ -5,8 +5,8 @@
"Override": { "Override": {
"System": "Information", "System": "Information",
"Microsoft": "Information", "Microsoft": "Information",
"Microsoft.AspNetCore.SignalR": "Debug", "Microsoft.AspNetCore.SignalR": "Error",
"Microsoft.AspNetCore.Http.Connections": "Debug" "Microsoft.AspNetCore.Http.Connections": "Error"
} }
} }
} }