Implement temporary file configuration endpoint (#15518)
* Implement temporary file configuration endpoint * Update MaxfileSize to be a string. * Make max file size a nullable integer --------- Co-authored-by: Elitsa <elm@umbraco.dk>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Asp.Versioning;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Umbraco.Cms.Api.Management.Factories;
|
||||
using Umbraco.Cms.Api.Management.ViewModels.TemporaryFile;
|
||||
|
||||
namespace Umbraco.Cms.Api.Management.Controllers.TemporaryFile;
|
||||
|
||||
[ApiVersion("1.0")]
|
||||
public class ConfigurationTemporaryFileController : TemporaryFileControllerBase
|
||||
{
|
||||
private readonly ITemporaryFileConfigurationPresentationFactory _temporaryFileConfigurationPresentationFactory;
|
||||
|
||||
public ConfigurationTemporaryFileController(
|
||||
ITemporaryFileConfigurationPresentationFactory temporaryFileConfigurationPresentationFactory) =>
|
||||
_temporaryFileConfigurationPresentationFactory = temporaryFileConfigurationPresentationFactory;
|
||||
|
||||
[HttpGet("configuration")]
|
||||
[MapToApiVersion("1.0")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
public Task<IActionResult> Configuration()
|
||||
{
|
||||
TemporaryFileConfigurationResponseModel responseModel = _temporaryFileConfigurationPresentationFactory.Create();
|
||||
return Task.FromResult<IActionResult>(Ok(responseModel));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user