Method GetFile
GetFile(String, String, String, String, String, String, Boolean, String)
Download main document file as a stream
Declaration
Stream GetFile(string connectionId, string documentId, string versionId, string documentDataId, string renditionId, string accessTypeEnum, bool ignoreHashValidation, string contentType)
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 |
System.String | contentType | The content type to return. Default value: application/octet-stream |
Returns
Type | Description |
---|---|
System.IO.Stream | A document stream |
Remarks
Used for direct HTTP download. Cannot be called directly via the API because no valid XML / JSON ticket is sent back here. Only support from IE 9.0 and newer.
Examples
A simple example for download main document file as a stream.
GET http://YourServerName/InfoShare/Json/File/GetFile?connectionId=4134c72d-939a-4f08-976c-58450254b5e7&documentId=2e916205-b211-ea11-a985-00155d290a08
Example for download main document file as a stream with optional parameter.
GET http://YourServerName/InfoShare/Json/File/GetFile?connectionId=4134c72d-939a-4f08-976c-58450254b5e7&documentId=2e916205-b211-ea11-a985-00155d290a08&versionId=2e916205-b211-ea11-a985-00155d290a08&documentDataId=92916205-b211-ea11-a985-00155d290a08&renditionId=a0916205-b211-ea11-a985-00155d290a08&accessTypeEnum=UnknownAccess&contentType=application/octet-stream
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) |