From 326eb7ebd784dd1464f99da89f2c42223bc7d1dd Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 2 Jan 2025 20:37:56 +0100 Subject: [PATCH] uploadToFolder add extra logging --- starsky/starsky/Controllers/UploadController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/starsky/starsky/Controllers/UploadController.cs b/starsky/starsky/Controllers/UploadController.cs index 5290421ba8..712b4904b4 100644 --- a/starsky/starsky/Controllers/UploadController.cs +++ b/starsky/starsky/Controllers/UploadController.cs @@ -89,12 +89,16 @@ public UploadController(IImport import, AppSettings appSettings, public async Task UploadToFolder() { var to = Request.Headers["to"].ToString(); + if ( string.IsNullOrWhiteSpace(to) ) { + _logger.LogInformation($"[UploadToFolder] Missing 'to' header in request"); return BadRequest("missing 'to' header"); } var parentDirectory = GetParentDirectoryFromRequestHeader(); + _logger.LogInformation($"[UploadToFolder] Upload Start to: {parentDirectory}"); + if ( parentDirectory == null ) { return NotFound(new ImportIndexItem { Status = ImportStatus.ParentDirectoryNotFound });