LinksControllerGetFile - метод
Get file contents to download it in browser by a link.
Пространство имён: Tessa.Web.Client.ControllersСборка: Tessa.Web.Client (в Tessa.Web.Client.dll) Версия: 4.0.4
[HttpGetAttribute("file")]
[SessionMethodAttribute(UserAccessLevel.Regular)]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> GetFile(
[FromQueryAttribute] Guid? cardID,
[FromQueryAttribute] Guid? fileID,
[FromQueryAttribute] Guid? versionID = null,
[FromQueryAttribute] string? fileName = null,
[FromQueryAttribute] Guid? cardTypeID = null,
[FromQueryAttribute] string? cardTypeName = null,
[FromQueryAttribute] string? fileTypeName = null,
[FromQueryAttribute] bool suggestFileNameForVersion = false,
[FromQueryAttribute] string? info = null,
[FromQueryAttribute] bool showErrorPage = true,
CancellationToken cancellationToken = default
)
<HttpGetAttribute("file")>
<SessionMethodAttribute(UserAccessLevel.Regular)>
<ProducesResponseTypeAttribute(200)>
Public Function GetFile (
<FromQueryAttribute> cardID As Guid?,
<FromQueryAttribute> fileID As Guid?,
<FromQueryAttribute> Optional versionID As Guid? = Nothing,
<FromQueryAttribute> Optional fileName As String = Nothing,
<FromQueryAttribute> Optional cardTypeID As Guid? = Nothing,
<FromQueryAttribute> Optional cardTypeName As String = Nothing,
<FromQueryAttribute> Optional fileTypeName As String = Nothing,
<FromQueryAttribute> Optional suggestFileNameForVersion As Boolean = false,
<FromQueryAttribute> Optional info As String = Nothing,
<FromQueryAttribute> Optional showErrorPage As Boolean = true,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of IActionResult)
public:
[HttpGetAttribute(L"file")]
[SessionMethodAttribute(UserAccessLevel::Regular)]
[ProducesResponseTypeAttribute(200)]
Task<IActionResult^>^ GetFile(
[FromQueryAttribute] Nullable<Guid> cardID,
[FromQueryAttribute] Nullable<Guid> fileID,
[FromQueryAttribute] Nullable<Guid> versionID = nullptr,
[FromQueryAttribute] String^ fileName = nullptr,
[FromQueryAttribute] Nullable<Guid> cardTypeID = nullptr,
[FromQueryAttribute] String^ cardTypeName = nullptr,
[FromQueryAttribute] String^ fileTypeName = nullptr,
[FromQueryAttribute] bool suggestFileNameForVersion = false,
[FromQueryAttribute] String^ info = nullptr,
[FromQueryAttribute] bool showErrorPage = true,
CancellationToken cancellationToken = CancellationToken()
)
[<HttpGetAttribute("file")>]
[<SessionMethodAttribute(UserAccessLevel.Regular)>]
[<ProducesResponseTypeAttribute(200)>]
member GetFile :
[<FromQueryAttribute>] cardID : Nullable<Guid> *
[<FromQueryAttribute>] fileID : Nullable<Guid> *
[<FromQueryAttribute>] ?versionID : Nullable<Guid> *
[<FromQueryAttribute>] ?fileName : string *
[<FromQueryAttribute>] ?cardTypeID : Nullable<Guid> *
[<FromQueryAttribute>] ?cardTypeName : string *
[<FromQueryAttribute>] ?fileTypeName : string *
[<FromQueryAttribute>] ?suggestFileNameForVersion : bool *
[<FromQueryAttribute>] ?info : string *
[<FromQueryAttribute>] ?showErrorPage : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _versionID = defaultArg versionID null
let _fileName = defaultArg fileName null
let _cardTypeID = defaultArg cardTypeID null
let _cardTypeName = defaultArg cardTypeName null
let _fileTypeName = defaultArg fileTypeName null
let _suggestFileNameForVersion = defaultArg suggestFileNameForVersion false
let _info = defaultArg info null
let _showErrorPage = defaultArg showErrorPage true
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IActionResult>
- cardID NullableGuid
- Card identifier.
- fileID NullableGuid
- File identifier.
- versionID NullableGuid (Optional)
- File version identifier.
- fileName String (Optional)
- File name with extension.
- cardTypeID NullableGuid (Optional)
- Card type identifier.
- cardTypeName String (Optional)
- Card type name (alias).
- fileTypeName String (Optional)
- File type name (alias).
- suggestFileNameForVersion Boolean (Optional)
- Recommendation to return suggested name for file version.
- info String (Optional)
- Additional parameters of the request Info, serialized as typed JSON.
- showErrorPage Boolean (Optional)
- Flag whether to return error page for a browser, and not exception in JSON form, as it happens for other APIs.
- cancellationToken CancellationToken (Optional)
- Token to cancel async task.
TaskIActionResultFile contents in a form browser can download.