ContentControllerGetContentAsync - метод

Get content by link.

Definition

Пространство имён: Tessa.Web.Controllers
Сборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.4
C#
[HttpGetAttribute("{type}/{contentID}")]
[ProducesAttribute("application/octet-stream", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> GetContentAsync(
	string type,
	string contentID,
	[FromQueryAttribute] string? token = null,
	CancellationToken cancellationToken = default
)

Параметры

type  String
Type of requested content.
contentID  String
Identifier of requested content.
token  String  (Optional)
Token for accessing content. Can be specified either in the query string or in the header Authorization.
cancellationToken  CancellationToken  (Optional)
Token to cancel async task.

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

TaskIActionResult
Requested content FileStreamResult, or status NotFound if the link is not valid, or status BadRequest if token is specified in both header and query string.

См. также