Search Results for

    Show / Hide Table of Contents

    Method DownloadFile

    DownloadFile(String, String, String, String, String, String, Boolean)

    Download main document file as a stream

    Declaration
    Stream DownloadFile(string connectionId, string documentId, string versionId, string documentDataId, string renditionId, string accessTypeEnum, bool ignoreHashValidation)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    System.String documentId

    The document id. See also Id

    System.String versionId

    Optional: The version id. See also GetVersionListItems(String, String, Int32, Int32)

    System.String documentDataId

    Optional: The document data id. See also DocumentData

    System.String renditionId

    Optional: The rendition id. See also DocumentData

    System.String accessTypeEnum

    Optional: Type of access AccessTypeEnum

    System.Boolean ignoreHashValidation

    Ignore system configuration for hash validation

    Returns
    Type Description
    System.IO.Stream

    A document stream

    Examples

    POST http://YourServerName/InfoShare/Json/File/DownloadFile

    A simple example for download main document file as a stream.

    {
       "connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
       "documentId": "653fa7fd-f6dd-e911-a947-00155d290a08",
       "versionId": "653fa7fd-f6dd-e911-a947-00155d290a08",
       "documentDataId": "",
       "renditionId": "",
       "ignoreHashValidation": false
    }

    Example for download main document file as a stream with options parameter.

    {
       "connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
       "documentId": "653fa7fd-f6dd-e911-a947-00155d290a08",
       "versionId": "653fa7fd-f6dd-e911-a947-00155d290a08",
       "documentDataId": "663fa7fe-f6dd-e911-a947-00166d290a08",
       "renditionId": "753ga7fd-f6dd-e911-a947-00178d290a08",
       "ignoreHashValidation": false
    }

    Response:

        data:application/octet-stream;base64,JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZ
        XMgMiAwIFIvTGFuZyhkZS1ERSkgL1N0cnVjdFRyZWVSb290IDM0OCAwIFIvTWFya0luZm88PC9NYXJrZWQgdHJ1ZT4+Pj4NCmV
        uZG9iag0KMiAwIG9iag0KPDwvVHlwZS9QYWdlcy9Db3VudCA2MC9LaWRzWyAzIDAgUiA4IDAgUiA0MSAwIFIgNDMgMC ......
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    Document without file {documentId} (10004)

    ServiceException

    No document found for documentId {documentId} (10005)

    ServiceException

    Not enough rights ({accessOperationName}, {accessOperationId}) (10071)

    ServiceException

    Could not retrieve version {versionId} for document {documentId} (10130)

    ServiceException

    Verification code is needed: Verification code not yet verified (10152)

    ServiceException

    BlobStore {blobStoreId} is not available (10171)

    ServiceException

    Could not get file stream: {errorMessage} (10172)

    Back to top Copyright © Kendox