Skip to content

Commit

Permalink
uploadToFolder add extra logging
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Jan 2, 2025
1 parent cec2c5d commit 326eb7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions starsky/starsky/Controllers/UploadController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ public UploadController(IImport import, AppSettings appSettings,
public async Task<IActionResult> 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 });
Expand Down

0 comments on commit 326eb7e

Please sign in to comment.