02-26-2015 04:05 AM
Hi,
Is it possible to take the extension of a file (which is stored as document in OnBase) using Hyland.UnityDocument class?.
Let me know ASAP.
Venkat
02-26-2015 04:49 AM
Hi All,
I was able to get the extension using the below property.
hylandDocument.DefaultFileType.Extension
Thanks
Venkat
02-26-2015 05:01 AM
I don't think DefaultFileType.Extension will always have the correct value because an OnBase "document" could have multiple revisions/renditions (each with it's own physical document and extension) and there is only one default file type for a DocumentType. To get the extension of a specific rendition, you would need to use retrieval (Application.Core.Retrieval) to get the PageData, which has an Extension property.
02-26-2015 05:35 AM
The DefaultFileType property will bring back the File Format that is configured on that Document's DocumentType.
The only other, albiet inefficient, way to get the file extension of the Document is to retrieve it through one of the DataProvider classes. The PageData class has an Extension property. The only limitation is that there may be some processing done to the Document that could possibly change the extension from the one stored on the disk group (i.e. a JPG file on disk retrieved through the ImageDataProvider will likely be converted to TIFF).
02-26-2015 06:34 AM
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.