Get contents FileStreamResult for a file 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.
[HttpPostAttribute("get-file-content")]
[SessionMethodAttribute(UserAccessLevel.Regular)]
[TypedJsonBodyAttribute]
[ConsumesAttribute("application/json", new string[] { ... })]
[ProducesAttribute("application/octet-stream", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> PostGetFileContent(
[FromBodyAttribute] CardGetFileContentRequest request,
[FromQueryAttribute] bool showErrorPage = false,
CancellationToken cancellationToken = default
)
<HttpPostAttribute("get-file-content")>
<SessionMethodAttribute(UserAccessLevel.Regular)>
<TypedJsonBodyAttribute>
<ConsumesAttribute("application/json", New String() { ... })>
<ProducesAttribute("application/octet-stream", New String() { ... })>
<ProducesResponseTypeAttribute(200)>
Public Function PostGetFileContent (
<FromBodyAttribute> request As CardGetFileContentRequest,
<FromQueryAttribute> Optional showErrorPage As Boolean = false,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of IActionResult)
public:
[HttpPostAttribute(L"get-file-content")]
[SessionMethodAttribute(UserAccessLevel::Regular)]
[TypedJsonBodyAttribute]
[ConsumesAttribute(L"application/json", __gc new array<String^>^ { ... })]
[ProducesAttribute(L"application/octet-stream", __gc new array<String^>^ { ... })]
[ProducesResponseTypeAttribute(200)]
Task<IActionResult^>^ PostGetFileContent(
[FromBodyAttribute] CardGetFileContentRequest^ request,
[FromQueryAttribute] bool showErrorPage = false,
CancellationToken cancellationToken = CancellationToken()
)
[<HttpPostAttribute("get-file-content")>]
[<SessionMethodAttribute(UserAccessLevel.Regular)>]
[<TypedJsonBodyAttribute>]
[<ConsumesAttribute("application/json", new string[] { ... })>]
[<ProducesAttribute("application/octet-stream", new string[] { ... })>]
[<ProducesResponseTypeAttribute(200)>]
member PostGetFileContent :
[<FromBodyAttribute>] request : CardGetFileContentRequest *
[<FromQueryAttribute>] ?showErrorPage : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _showErrorPage = defaultArg showErrorPage false
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IActionResult>