remove upload policy for allow model uploading from users

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-02 20:49:17 +03:00
parent 289344799e
commit c15167f21d
+1 -1
View File
@@ -163,7 +163,7 @@ app.MapPost("/resources/{dataFolder?}",
async ([FromRoute]string? dataFolder, IFormFile data, IResourcesService resourceService, CancellationToken cancellationToken) async ([FromRoute]string? dataFolder, IFormFile data, IResourcesService resourceService, CancellationToken cancellationToken)
=> await resourceService.SaveResource(dataFolder, data, cancellationToken)) => await resourceService.SaveResource(dataFolder, data, cancellationToken))
.Accepts<IFormFile>("multipart/form-data") .Accepts<IFormFile>("multipart/form-data")
.RequireAuthorization(apiUploaderPolicy) .RequireAuthorization()
//.WithOpenApi(op => new(op){ Summary = "Upload resource"}); //For some reason doesn't work when this is specified. //.WithOpenApi(op => new(op){ Summary = "Upload resource"}); //For some reason doesn't work when this is specified.
.DisableAntiforgery(); .DisableAntiforgery();