Occurs after a user has invoked the Upload command in Meridian Explorer to upload a file but before the document is created in the vault. This event can be used to get the source filename and the URL parameters of the Meridian Explorer page. Its return values can be used to allow the upload to proceed and to specify the destination folder and document type or to cancel the operation.
This event is required for the Upload command. The command must be enabled as described in BlueCielo Meridian Explorer Administrator's Guide.
Function AIMS_Attach_Intialize (SourceFilename As String, QueryString As Array) As Array
Name |
Description |
---|---|
SourceFilename |
The original filename that is uploaded from the client. |
QueryString |
An array of name-value pairs for the URL parameters of the Meridian Explorer page. |
Value | Description |
---|---|
Result |
Boolean True if the event should succeed, False if it should fail. If the event should fail, the upload is aborted and an error message should be returned as the second item in the array and the following items should not be returned. |
TargetPath |
The path of the target folder in the vault where the uploaded file should be stored. |
DocumentType |
The internal name of the document type that should be assigned to the new document. |
' Event handler for BC-Explorer Asset Management Module link ' Returns required input for the Upload function Function AIMS_Attach_Intialize(sourceFileName, queryString) Dim targetFolder Dim docTypeName ' Determine the target folder for the uploaded document Set targetFolder = Vault.RootFolder.GetSubFolder("Miscellaneous") If Not User.HasPrivilege(AS_PRIVILEGE_DOCUMENT_CREATE, targetFolder) Then ' Abort the upload AIMS_Attach_Intialize = Array(False, "Upload is not allowed") Exit Function End If ' Determine the document type for the uploaded folder docTypeName = "GenericDocument" If (LCase(Right(sourceFileName, 4)) = ".dwg") Then docTypeName = "Drawing" End If ' Return an array with the target folder path and the document type name AIMS_Attach_Intialize = Array(True, targetFolder.Path, docTypeName) End Function
Related information