From d3c52e55d31cd14e27a5acaeac97ab706cb30ce4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Dec 2025 07:20:57 +0000 Subject: [PATCH 1/2] fix: Improve upload dialog vertical spacing and button layout - Increase dialog height from 320 to 350 pixels for better visual balance - Move action buttons down from Y=270 to Y=290 - Provides more comfortable spacing between status label and buttons - Increases bottom margin from 22px to 32px for less cramped appearance Resolves issue where dialog window wasn't properly sized for button layout. --- Intersect.Editor/Forms/FrmUploadToServer.Designer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Intersect.Editor/Forms/FrmUploadToServer.Designer.cs b/Intersect.Editor/Forms/FrmUploadToServer.Designer.cs index 367109e457..0a915d9f0d 100644 --- a/Intersect.Editor/Forms/FrmUploadToServer.Designer.cs +++ b/Intersect.Editor/Forms/FrmUploadToServer.Designer.cs @@ -172,7 +172,7 @@ private void InitializeComponent() // // btnLogin // - this.btnLogin.Location = new System.Drawing.Point(206, 270); + this.btnLogin.Location = new System.Drawing.Point(206, 290); this.btnLogin.Name = "btnLogin"; this.btnLogin.Padding = new System.Windows.Forms.Padding(5); this.btnLogin.Size = new System.Drawing.Size(85, 28); @@ -184,7 +184,7 @@ private void InitializeComponent() // btnUpload // this.btnUpload.Enabled = false; - this.btnUpload.Location = new System.Drawing.Point(297, 270); + this.btnUpload.Location = new System.Drawing.Point(297, 290); this.btnUpload.Name = "btnUpload"; this.btnUpload.Padding = new System.Windows.Forms.Padding(5); this.btnUpload.Size = new System.Drawing.Size(85, 28); @@ -195,7 +195,7 @@ private void InitializeComponent() // btnClose // this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnClose.Location = new System.Drawing.Point(388, 270); + this.btnClose.Location = new System.Drawing.Point(388, 290); this.btnClose.Name = "btnClose"; this.btnClose.Padding = new System.Windows.Forms.Padding(5); this.btnClose.Size = new System.Drawing.Size(84, 28); @@ -207,7 +207,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(484, 320); + this.ClientSize = new System.Drawing.Size(484, 350); this.Controls.Add(this.btnTestUrl); this.Controls.Add(this.btnLogin); this.Controls.Add(this.btnClose); From 9de737cededa450d285a03990931436af71c802d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Dec 2025 07:24:04 +0000 Subject: [PATCH 2/2] fix: Resolve file upload validation error in EditorUpdatesController The server was returning HTTP 400 (ValidationProblemDetails) because ASP.NET Core model binding failed when trying to bind IFormFileCollection as a [FromForm] parameter. Changes: - Remove [FromForm] IFormFileCollection parameter from both endpoints - Access files directly via Request.Form.Files instead - This is the correct approach for multipart file uploads in ASP.NET Core The uploads were failing with "Error while copying content to a stream" because the model validation was rejecting the requests before they reached the controller logic. Fixes issue where all upload attempts returned 400 Bad Request. --- .../Web/Controllers/Api/EditorUpdatesController.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs b/Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs index b6f06a7d08..56721fdb39 100644 --- a/Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs +++ b/Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs @@ -51,7 +51,6 @@ IOptionsMonitor updateServerOptionsMonitor /// Files are saved to the assets/client directory and will be automatically /// included in the next client update manifest. /// - /// Files to upload /// Optional subfolder within assets/client (e.g., "resources", "resources/images") /// Upload results for each file [HttpPost("client")] @@ -60,11 +59,10 @@ IOptionsMonitor updateServerOptionsMonitor [ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.BadRequest, ContentTypes.Json)] [ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.Forbidden, ContentTypes.Json)] public async Task UploadClientFiles( - [FromForm] IFormFileCollection files, [FromForm] string? subfolder = null ) { - return await UploadFilesInternal("client", files, subfolder); + return await UploadFilesInternal("client", Request.Form.Files, subfolder); } /// @@ -72,7 +70,6 @@ public async Task UploadClientFiles( /// Files are saved to the assets/editor directory and will be automatically /// included in the next editor update manifest. /// - /// Files to upload /// Optional subfolder within assets/editor /// Upload results for each file [HttpPost("editor")] @@ -81,11 +78,10 @@ public async Task UploadClientFiles( [ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.BadRequest, ContentTypes.Json)] [ProducesResponseType(typeof(ErrorResponse), (int)HttpStatusCode.Forbidden, ContentTypes.Json)] public async Task UploadEditorFiles( - [FromForm] IFormFileCollection files, [FromForm] string? subfolder = null ) { - return await UploadFilesInternal("editor", files, subfolder); + return await UploadFilesInternal("editor", Request.Form.Files, subfolder); } private async Task UploadFilesInternal(