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

Question

Question

how can I obtain the filesize of document whith the workflow or sdk?

asked on April 3, 2015

I need to make a workflow that use the filesize. In this case, is necesary obtain  information about the document.

I hope someone can share the script with me.

I will be very grateful

Regards

 

Miguel

 

0 0

Replies

replied on April 3, 2015 Show version history

Miguel - I am assuming that you mean the size of an edoc file attached to a document?  If so, here is a Workflow SDK code snippet that will do that.  The token exposed by the script activity is called 'FileSize' and represents the size in bytes of the edoc file.  This is a 9.2 SDK Script activity using RA.  If you have an earlier version of Workflow and need the LFSO code then let me know...

        Protected Overrides Sub Execute()
            'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session

            If Me.BoundEntryInfo.EntryType = EntryType.Document Then
                Dim docInfo As DocumentInfo = DirectCast(Me.BoundEntryInfo, DocumentInfo)

                Me.SetTokenValue("FileSize", docInfo.ElecDocumentSize)

                docInfo.Dispose

            End If

        End Sub

NOTE: You can also use the 'Find Entry' workflow activity and set the 'Additional Properties' to expose the edoc filesize.  Perhaps that would be easier and more efficient than the SDK script?

 

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

Sign in to reply to this post.