Zooflow: use displayname

This commit is contained in:
Jonathan Jenne
2022-02-11 16:17:57 +01:00
parent 28e1407bf3
commit 8247ae8005
7 changed files with 35 additions and 12 deletions

View File

@@ -32,6 +32,7 @@ Namespace DocumentResultList
Public Property TempPath As String = Nothing
Public Property FileHash As String = Nothing
Public Property DocumentType As String = Nothing
Public Property DisplayFileName As String = Nothing
Public Sub New(pPrimaryKey As Long)
Id = pPrimaryKey

View File

@@ -56,15 +56,17 @@ Namespace DocumentResultList
Dim oDocumentInfo As DocumentInfo = Client.GetDocumentInfo(User.UserId, pObjectId)
Dim oFileInfo As New FileInfo(oDocumentInfo.FullPath)
' Load Doctype Attribute
' Load System Attributes
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
Dim oResultDocumentInfo As New Document(pObjectId) With {
.Contents = Load_FromDisk(oDocumentInfo.FullPath),
.AccessRight = oDocumentInfo.AccessRight,
.FullPath = oDocumentInfo.FullPath,
.Extension = oFileInfo.Extension.Substring(1),
.DocumentType = oDoctype.Value
.DocumentType = oDoctype.Value,
.DisplayFileName = oDisplayFileName.Value
}
Return oResultDocumentInfo
@@ -81,8 +83,9 @@ Namespace DocumentResultList
Return Nothing
End If
' Load Doctype Attribute
' Load System Attributes
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
Dim oResultDocumentInfo As New Document(pObjectId) With {
.Contents = oFileObject._FileContents,
@@ -90,7 +93,8 @@ Namespace DocumentResultList
.AccessRight = Rights.AccessRight.FULL,
.FileHash = oFileObject._FileHash,
.FullPath = Nothing,
.DocumentType = oDoctype.Value
.DocumentType = oDoctype.Value,
.DisplayFileName = oDisplayFileName.Value
}
Return oResultDocumentInfo