Bug: creating file output stream to an invalid path causes indefinite stall.
This commit is contained in:
parent
b41508e472
commit
61725b4d07
1 changed files with 7 additions and 0 deletions
|
@ -23,7 +23,14 @@
|
||||||
{
|
{
|
||||||
_umsg = $"Uploading {counter}/{e.FileCount} files...";
|
_umsg = $"Uploading {counter}/{e.FileCount} files...";
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
Console.WriteLine($"Fos: /tmp/uploads/{file.Name}");
|
||||||
|
if (!System.IO.Directory.Exists("/tmp/uploads"))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory("/tmp/uploads");
|
||||||
|
}
|
||||||
|
Console.WriteLine($"fosse");
|
||||||
await using var fos = System.IO.File.OpenWrite($"/tmp/uploads/{file.Name}");
|
await using var fos = System.IO.File.OpenWrite($"/tmp/uploads/{file.Name}");
|
||||||
|
Console.WriteLine("Fos opened");
|
||||||
await file.OpenReadStream(1024 * 1024 * 10).CopyToAsync(fos);
|
await file.OpenReadStream(1024 * 1024 * 10).CopyToAsync(fos);
|
||||||
Console.WriteLine($"File: /tmp/uploads/{file.Name} written...");
|
Console.WriteLine($"File: /tmp/uploads/{file.Name} written...");
|
||||||
++counter;
|
++counter;
|
||||||
|
|
Loading…
Reference in a new issue