Skip to content
Snippets Groups Projects
Commit 90574cae authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- fixed issue whit compare file test (file hash was always the same; always empty string)

parent bea686ad
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ namespace ClientServer.Helpers
/// </summary>
public static class Constants
{
public static string VersionString = "2.23.2";
public static string VersionString = "2.24.0";
/// <summary>
/// this is only set once at program.cs!!
......
......@@ -170,6 +170,9 @@ namespace ClientServer.Helpers
using (var stream = new FileStream(info.FullName, FileMode.Create))
{
await file.CopyToAsync(stream);
//CopyToAsync will set the stream position to the last position
//when we try to read the stream (e.g. md5) then we always get the empty string
stream.Seek(0, SeekOrigin.Begin);
using (var md5 = MD5.Create())
{
......
......@@ -66,7 +66,7 @@ namespace ClientServer.Models.Interfaces
throw new Exception($"test file could not be read, id: {testAssetReference.FileReferenceTestAssetId}");
}
testAssets.Add(new AllTestAsset(testAssetReference.TestId,
testAssets.Add(new AllTestAsset(testAssetReference.FileReferenceTestAssetId,
testAssetReference.FileReferenceTestAsset.OriginalName,
content,
testAssetReference.FileReferenceTestAsset.MimeType,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment