EDMI: Load Object Store Paths

This commit is contained in:
Jonathan Jenne
2020-04-17 11:57:18 +02:00
parent 88dfb3fab1
commit 14194248ad
12 changed files with 183 additions and 121 deletions

View File

@@ -53,12 +53,12 @@ Public Class Document
''' </summary>
''' <param name="FilePath">The filename to import</param>
''' <returns>A document object</returns>
Public Async Function ImportFileAsync(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionPeriod As Integer = 0) As Task(Of DocumentResult)
Public Async Function ImportFileAsync(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionDays As Integer = 0) As Task(Of DocumentResult)
Try
Using oStream As New FileStream(FilePath, FileMode.Open)
Dim oContents As Byte() = {}
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
Dim oResult = Await _channel.ImportFileAsync(FilePath, oContents, Environment.UserName)
Dim oResult = Await _channel.ImportFileAsync(FilePath, oContents, 1, "WichtigesDokument", RetentionDays)
Return oResult
End Using
@@ -77,7 +77,7 @@ Public Class Document
Try
Dim oContents As Byte() = File.ReadAllBytes(FilePath)
Dim oInfo As New FileInfo(FilePath)
Dim oDocObject = _channel.ImportFile(FilePath, oContents, Environment.UserName)
Dim oDocObject = _channel.ImportFile(FilePath, oContents, 1, "WichtigesDokument", 0)
Return oDocObject
Catch ex As Exception
_logger.Error(ex)