01-25-2021 08:04 AM
Hi all
I have a problem getting the file size of a document in OnBase. I have tried with this:
using (PageData pd = app.Core.Retrieval.Image.GetDocument(l_Doc.DefaultRenditionOfLatestRevision))
{
using (Stream s = pd.Stream) { ll_By = s.Length; }
}
For a given document, the result was 96675 (bytes, I guess), but if we see it in OnBase document properties or in the filesystem location, the actual size is 29771.
Why is there this difference? What is wrong?
Another possibility is to know the file physical path in the filesystem, but I don't know how to get it from the API document properties.
Thanks in advance.
01-25-2021 08:38 PM
Based on my experience, Hyland has some special handling for the image documents. It is not possible to retrieve the "raw" image files from the OnBase system, including Unity Client and Unity API.
There are some setting available while retrieving the image document, you can refer to the link below:
https://sdk.onbase.com/unitySDK/html/d306c47b-af4e-91c2-e257-3c1c11d9ed3b.htm
01-26-2021 06:55 AM
Thanks for your reply Chiu Ki Sit.
I'm trying with that.
As for the last question, do you know if there is a way to obtain the physucal path to the file? If so, I then could obtain the properties directly from the file.
Thanks and regards,
01-26-2021 07:07 AM
Antonio,
The API does not provide access directly to the file on the disk group. This information is stored in the database so if you needed to directly access it you would need to write a SELECT query against the database.
For information about the database tables you can reference the database reporting guide.
01-27-2021 08:31 AM
Thank you so much, Daniel Quill.
I have used the DB, as you suggested, and could resolve the problem.
Best regards,
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.