feat: add an upload button to ease adding game files (#29)
* feat: API support for uploading ROM’s * fix: downloads of files larger than approx 300MB would cause an out of memory error * fix: resolved broken bios path * feat: added an upload button
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using gaseous_server;
|
||||
using gaseous_tools;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||
|
||||
Logging.Log(Logging.LogType.Information, "Startup", "Starting Gaseous Server");
|
||||
|
||||
@@ -63,6 +65,22 @@ builder.Services.AddControllers(options =>
|
||||
});
|
||||
});
|
||||
|
||||
// set max upload size
|
||||
builder.Services.Configure<IISServerOptions>(options =>
|
||||
{
|
||||
options.MaxRequestBodySize = int.MaxValue;
|
||||
});
|
||||
builder.Services.Configure<KestrelServerOptions>(options =>
|
||||
{
|
||||
options.Limits.MaxRequestBodySize = int.MaxValue;
|
||||
});
|
||||
builder.Services.Configure<FormOptions>(options =>
|
||||
{
|
||||
options.ValueLengthLimit = int.MaxValue;
|
||||
options.MultipartBodyLengthLimit = int.MaxValue;
|
||||
options.MultipartHeadersLengthLimit = int.MaxValue;
|
||||
});
|
||||
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
Reference in New Issue
Block a user