CardsControllerPostGetFileTemplate - метод

Get contents FileStreamResult for a file created from template with specified attributes. Suggested file name is returned in response header Content-Disposition.

Response from cards API CardGetFileContentResponse isn't returned. But if there are errors occured, they are returned as PlainValidationResult object as typed JSON with status BadRequest.

Definition

Пространство имён: Tessa.Web.Controllers
Сборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.4
C#
[HttpPostAttribute("get-file-template")]
[SessionMethodAttribute(UserAccessLevel.Regular)]
[TypedJsonBodyAttribute]
[ConsumesAttribute("application/json", new string[] { ... })]
[ProducesAttribute("application/octet-stream", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> PostGetFileTemplate(
	[FromBodyAttribute] CardGetFileTemplateRequest request,
	[FromQueryAttribute] bool showErrorPage = false,
	CancellationToken cancellationToken = default
)

Параметры

request  CardGetFileTemplateRequest
Request to get file contents.
showErrorPage  Boolean  (Optional)
Flag if error html page should be returned in spite of PlainValidationResult object.
cancellationToken  CancellationToken  (Optional)
Token to cancel async task.

Возвращаемое значение

TaskIActionResult
File contents FileStreamResult, or PlainValidationResult object with status BadRequest if error occured.

См. также