update service and api

This commit is contained in:
Jonathan Jenne
2020-02-04 15:42:12 +01:00
parent 265c08d5d5
commit c66a2dc5e5
21 changed files with 622 additions and 396 deletions

View File

@@ -68,6 +68,26 @@ Public Class Document
End Try
End Function
''' <summary>
''' Imports a file by filename
''' </summary>
''' <param name="FilePath">The filename to import</param>
''' <returns>A document object</returns>
Public Async Function ImportFile2(FilePath As String) As Task(Of DocumentResult2)
Try
Dim oContents As Byte() = File.ReadAllBytes(FilePath)
Dim oInfo As New FileInfo(FilePath)
Dim oName As String = oInfo.Name
Dim oExtension As String = oInfo.Extension.Substring(1)
Dim oResult = Await _channel.ImportFileAsync(oInfo, oContents)
Return oResult
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
''' <summary>
''' Imports a file by filename
''' </summary>