Is there some methods that i can call to get the filetype of the file on the server?
I'm using DocumentManagement and ContentService client.
Hi Di,
Could you clarify what you mean by “Filetype”?
Do you mean the file’s extension? Its MIME type as stored against the version?
These would typically be properties of the version of a node.
Kyle
Yes, i mean extension. Is there any method we can use for this purpose? I didn't find one from service reference.
When you download a file through the GUI, the file extension can dynamically change for client-side consumption.
Please see this KBA I wrote a while back:
https://knowledge.opentext.com/go/15104959
You’ll see in that KBA, the extension most closely resembles the original file extension of the file when it was uploaded to Content Server – i.e., the file extension as stored in the DVersData database table for the document version in question.
If you want that extension, the “FileType” property on a Version object will give you that extension.
You can obtain a Version object instance by using the DocumentManagement.GetVersion() call, passing in a DataID and version number.
Cheers,