diff --git a/GUIs.Test.EDMIBenchmark/Form1.vb b/GUIs.Test.EDMIBenchmark/Form1.vb index fd3aa573..318553d3 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.vb +++ b/GUIs.Test.EDMIBenchmark/Form1.vb @@ -58,7 +58,7 @@ Public Class Form1 AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})") - Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.Name, "WichtigesDokument", 1, 0) + Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.FullName, "WichtigesDokument", 1, 0) AddLogMessage($"File with Id [{oObjectId}] imported!") oSW.Stop() AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}") diff --git a/Modules.EDMIAPI/Client.vb b/Modules.EDMIAPI/Client.vb index 8bceaa00..9cdd7a7d 100644 --- a/Modules.EDMIAPI/Client.vb +++ b/Modules.EDMIAPI/Client.vb @@ -81,7 +81,7 @@ Public Class Client End If Using oStream As New FileStream(FilePath, FileMode.Open) - Dim oContents As Byte() = {} + Dim oContents(oStream.Length) As Byte Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length) Dim oData As New DocumentImportRequest() With { .FileName = oFileInfo.Name,