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:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user