Files
Umbraco-CMS/src/Umbraco.Core/Configuration/Models/HostingSettings.cs
Mole 313b60aca5 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>
2025-11-03 15:22:16 +01:00

46 lines
1.5 KiB
C#

// Copyright (c) Umbraco.
// See LICENSE for more details.
using System.ComponentModel;
namespace Umbraco.Cms.Core.Configuration.Models;
/// <summary>
/// Typed configuration options for hosting settings.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigHosting)]
public class HostingSettings
{
internal const string StaticLocalTempStorageLocation = "Default";
internal const bool StaticDebug = false;
/// <summary>
/// Gets or sets a value for the application virtual path.
/// </summary>
public string? ApplicationVirtualPath { get; set; }
/// <summary>
/// Gets or sets a value for the location of temporary files.
/// </summary>
[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>
/// <value><c>true</c> if [debug mode]; otherwise, <c>false</c>.</value>
[DefaultValue(StaticDebug)]
public bool Debug { get; set; } = StaticDebug;
/// <summary>
/// Gets or sets a value specifying the name of the site.
/// </summary>
public string? SiteName { get; set; }
}