Load Balancing: Move temporary files and make them configurable to allow for media upload when load balancing the backoffice (#20717)

* make file upload location configurable

* Update src/Umbraco.Core/Configuration/Models/HostingSettings.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix default implementation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Mole
2025-11-03 15:22:16 +01:00
committed by GitHub
parent 4ee1d7b13e
commit 313b60aca5
4 changed files with 17 additions and 2 deletions

View File

@@ -25,6 +25,12 @@ public class HostingSettings
[DefaultValue(StaticLocalTempStorageLocation)]
public LocalTempStorage LocalTempStorageLocation { get; set; } = Enum.Parse<LocalTempStorage>(StaticLocalTempStorageLocation);
/// <summary>
/// Gets or sets a value for the location of temporary file uploads.
/// </summary>
/// <value>/umbraco/Data/TEMP/TemporaryFile if nothing is specified.</value>
public string? TemporaryFileUploadLocation { get; set; }
/// <summary>
/// Gets or sets a value indicating whether umbraco is running in [debug mode].
/// </summary>

View File

@@ -43,7 +43,12 @@ public interface IHostingEnvironment
string LocalTempPath { get; }
/// <summary>
/// The web application's hosted path
/// Gets the location of temporary file uploads.
/// </summary>
public string TemporaryFileUploadPath => Path.Combine(LocalTempPath, "TemporaryFile");
/// <summary>
/// The web application's hosted path.
/// </summary>
/// <remarks>
/// In most cases this will return "/" but if the site is hosted in a virtual directory then this will return the