Implemented upload and downloading in daemon, api server and frontend

This commit is contained in:
2025-03-04 14:49:32 +01:00
parent 43b04ff630
commit fbf7cb554b
7 changed files with 131 additions and 7 deletions

View File

@@ -73,6 +73,19 @@ public class ServerFileSystem
return Task.CompletedTask;
}
public Task Read(string inputPath, Func<Stream, Task> onHandle)
{
var path = Normalize(inputPath);
FileSystem.OpenFile(path, stream =>
{
// No try catch here because the safe fs abstraction already handles every error occuring in the handle
onHandle.Invoke(stream).Wait();
});
return Task.CompletedTask;
}
private string Normalize(string path)
{