Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Intersect.Server.Web.Http;
using Intersect.Server.Web.Types;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

Expand Down Expand Up @@ -54,12 +55,15 @@ IOptionsMonitor<UpdateServerOptions> updateServerOptionsMonitor
/// <param name="subfolder">Optional subfolder within assets/client (e.g., "resources", "resources/images")</param>
/// <returns>Upload results for each file</returns>
[HttpPost("client")]
[Consumes("multipart/form-data")]
[DisableRequestSizeLimit]
[RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue, ValueLengthLimit = int.MaxValue)]
[ProducesResponseType(typeof(UploadResponse), (int)HttpStatusCode.OK, ContentTypes.Json)]
[ProducesResponseType(typeof(UploadResponse), (int)HttpStatusCode.MultiStatus, ContentTypes.Json)]
[ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.BadRequest, ContentTypes.Json)]
[ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.Forbidden, ContentTypes.Json)]
public async Task<IActionResult> UploadClientFiles(
[FromForm] string? subfolder = null
[FromQuery] string? subfolder = null
)
{
return await UploadFilesInternal("client", Request.Form.Files, subfolder);
Expand All @@ -73,12 +77,15 @@ public async Task<IActionResult> UploadClientFiles(
/// <param name="subfolder">Optional subfolder within assets/editor</param>
/// <returns>Upload results for each file</returns>
[HttpPost("editor")]
[Consumes("multipart/form-data")]
[DisableRequestSizeLimit]
[RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue, ValueLengthLimit = int.MaxValue)]
[ProducesResponseType(typeof(UploadResponse), (int)HttpStatusCode.OK, ContentTypes.Json)]
[ProducesResponseType(typeof(UploadResponse), (int)HttpStatusCode.MultiStatus, ContentTypes.Json)]
[ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.BadRequest, ContentTypes.Json)]
[ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.Forbidden, ContentTypes.Json)]
public async Task<IActionResult> UploadEditorFiles(
[FromForm] string? subfolder = null
[FromQuery] string? subfolder = null
)
{
return await UploadFilesInternal("editor", Request.Form.Files, subfolder);
Expand Down
Loading