Method DownloadFileBytes
DownloadFileBytes(String, String, String, String, String, String, Int64, Int32, Boolean)
Download a part of main document file as byte array
Declaration
byte[] DownloadFileBytes(string connectionId, string documentId, string versionId, string documentDataId, string renditionId, string accessTypeEnum, long from, int count, 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.Int64 | from | Optional: Start byte for reading. -1: start from the beginning |
System.Int32 | count | Optional: Number of bytes to read. -1: read all bytes |
System.Boolean | ignoreHashValidation | Ignore system configuration for hash validation |
Returns
Type | Description |
---|---|
System.Byte[] | Some bytes from main document file |
Examples
POST http://YourServerName/InfoShare/Json/File/DownloadFileBytes
A simple example for download a part of main document file as byte array.{
"connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
"documentId": "653fa7fd-f6dd-e911-a947-00155d290a08",
"versionId": "653fa7fd-f6dd-e911-a947-00155d290a08",
"documentDataId": "",
"renditionId": "",
"accessTypeEnum": "",
"from": -1,
"count": -1,
"ignoreHashValidation": false
}
Example for downloads a part of main document file as byte array with options parameter.
{
"connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
"documentId": "653fa7fd-f6dd-e911-a947-00155d290a08",
"versionId": "653fa7fd-f6dd-e911-a947-00155d290a08",
"documentDataId": "853fa7fd-f6dd-e911-a947-00155d290a08",
"renditionId": "653ds7fd-f6dd-e911-a947-00155d290a08",
"accessTypeEnum": "644fa7fd-f6dd-e911-a947-00155d290a08",
"from": -1,
"count": -1,
"ignoreHashValidation": false
}
Response:
{
"DownloadFileBytesResult":[37,80,68,70,45,49,46,53,13,10,37,181,181,181,181,13,10,49,32,48,32,111,
98,106,13,10,60,60,47,84,121,112,101,47,67,97,116,97,108,111,103,47,80,97,11,68,69,41,32,47,83,116,114 ....]
}
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 | From parameter to high (10009) |
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) |