Files
Umbraco-CMS/src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs
Bjarke Berg 835388ced0 Temporary files endpoints for management api (#13944)
* Added temporary file uploads including a repository implementation using local temp folder.

* missing files

* Fixed copy paste error

* Updated OpenApi.json

* Updated OpenApi.json

* Added file extension check

* Clean up. Removed old TemporaryFileService and UploadFileService and updated dictionary items to use this new items

* Clean up

* Get rid of stream directly on TemporaryFileModel, and use delegate to open stream instead.

* Review changes

* Moved models to their own files

* Reverted launch settings

* Update open API JSON file

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-03-16 08:25:15 +01:00

37 lines
1.2 KiB
C#

// Copyright (c) Umbraco.
// See LICENSE for more details.
using System.ComponentModel;
namespace Umbraco.Cms.Core.Configuration.Models;
/// <summary>
/// Typed configuration options for runtime settings.
/// </summary>
[UmbracoOptions(Constants.Configuration.ConfigRuntime)]
public class RuntimeSettings
{
private const string StaticTemporaryFileLifeTime = "1.00:00:00"; // TimeSpan.FromDays(1);
/// <summary>
/// Gets or sets the runtime mode.
/// </summary>
[DefaultValue(RuntimeMode.BackofficeDevelopment)]
public RuntimeMode Mode { get; set; } = RuntimeMode.BackofficeDevelopment;
/// <summary>
/// Gets or sets a value for the maximum query string length.
/// </summary>
public int? MaxQueryStringLength { get; set; }
/// <summary>
/// Gets or sets a value for the maximum request length in kb.
/// </summary>
public int? MaxRequestLength { get; set; }
/// <summary>
/// Gets or sets the timespan temporary files are kept, before they are removed by a background task.
/// </summary>
[DefaultValue(StaticTemporaryFileLifeTime)]
public TimeSpan TemporaryFileLifeTime { get; set; } = TimeSpan.Parse(StaticTemporaryFileLifeTime);
}