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
10 changes: 10 additions & 0 deletions Intersect.Server/Web/Controllers/Api/EditorUpdatesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ private async Task<IActionResult> UploadFilesInternal(

try
{
// Ensure the parent directory exists (file.FileName may contain subdirectories)
if (fileInfo.Directory != null && !fileInfo.Directory.Exists)
{
fileInfo.Directory.Create();
_logger.LogDebug(
"Created directory for file upload: {DirectoryPath}",
Path.GetRelativePath(assetRootPath, fileInfo.Directory.FullName)
);
}

// Write the file (overwrites if exists - this is intentional for updates)
using var networkStream = file.OpenReadStream();
using var targetStream = fileInfo.Open(
Expand Down
Loading