EDMI.API: add parameter to load file contents for GetFileObject

This commit is contained in:
Jonathan Jenne
2021-12-17 16:41:05 +01:00
parent 1b6a69b24f
commit 97fd37de0c
4 changed files with 35 additions and 9 deletions

View File

@@ -13,9 +13,13 @@ Namespace Modules.Zooflow
Channel = pChannel
End Sub
Public Async Function RunAsync(pObjectId As Long) As Task(Of FileObject)
Public Async Function RunAsync(pObjectId As Long, pLoadFileContents As Boolean) As Task(Of FileObject)
Try
Dim oResult = Await Channel.GetFileObjectAsync(New GetFileObjectRequest With {.ObjectId = pObjectId})
Dim oParams = New GetFileObjectRequest With {
.ObjectId = pObjectId,
.LoadFileContents = pLoadFileContents
}
Dim oResult = Await Channel.GetFileObjectAsync(oParams)
If oResult.OK Then
Return oResult.FileObject
Else
@@ -27,9 +31,13 @@ Namespace Modules.Zooflow
End Try
End Function
Public Function Run(pObjectId As Long) As FileObject
Public Function Run(pObjectId As Long, pLoadFileContents As Boolean) As FileObject
Try
Dim oResult = Channel.GetFileObject(New GetFileObjectRequest With {.ObjectId = pObjectId})
Dim oParams = New GetFileObjectRequest With {
.ObjectId = pObjectId,
.LoadFileContents = pLoadFileContents
}
Dim oResult = Channel.GetFileObject(oParams)
If oResult.OK Then
Return oResult.FileObject
Else