Hi all, I need to run some checks on uploaded documents based on file extension and filename
We're using the Classic Web client
Basic code below, it works when it's a Precondition in a workflow, using either Desktop or Classic Web clients
But, I now need to move it to an Event Handler for reasons (BeforeFileUpload, or BeforeCreateNewObjectFinalize), and when I do, it stops working in Classic Web, although continues to work in Desktop
' Test filetype on upload to Reports document classes. Precondition in Reports workflow ' Needs an IF to allow/disallow certain filetypes if implemented Dim oObjectFiles : Set oObjectFiles = Vault.ObjectFileOperations.GetFiles(ObjVer) Dim oObjectFile : Set oObjectFile = oObjectFiles.Item(1) Dim strExtension strExtension = oObjectFile.Extension ' Get file extension Err.Raise MFScriptCancel, "Filename: '" & oObjectFile.Title & ". Filetype: '" & strExtension & "'"
It's this part