You are viewing limited content. For full access, please sign in.

Question

Question

How to get the folder size via the SDK or with Advanced Search

asked on August 17, 2015 Show version history

I've got a workflow which scan some folder and send for each folder all the entry attached in a zip file. This is working great except if the size of the zip (>10 mo) is to big for the SMTP server.

Is there a way with the SDK to compute the size of a entry in order to know if I can send my folder or if I have to split it.

Each entry contain Tiff file not a PDF so I can't use the electronic file size.

On the other hand in there a way to make a Advanced to find all the folder that are bigger than 10 Mo.

I found a class FolderStatistics which had the following property public long AttachmentFileSize { get; } but how can I call it I don't find any Entry.GetFolderStatistics ...

 

Any ideas are welcome.

Thanks.

0 0

Answer

SELECTED ANSWER
replied on August 17, 2015

Call Folder.GetFolderStatistics to get the FolderStatistics. The AttachmentFileSize is the size of attachment annotations.

0 0

Replies

replied on August 17, 2015

Sorry it is Folder.GetStatistics (not GetFolderStatistics) in the Laserfiche.RepositoryAccess.Folder class.

1 0
replied on August 17, 2015

Sebastian,

 

When you do your repository search you can select to expose the 'Total Document Size' property of each entry.  That should allow you to add some conditional logic to only send those document < 10Meg in size.

Here is a screen shot;

replied on August 17, 2015

Which namespace do you use to do so  Laserfiche.RepositoryAccess.Folder

I've only GetFolderInfo() but no GetFolderStatistics ()

Is there another way to have the size of the tiff ?

Thanks

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.