mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
delete temporary created files
This commit is contained in:
parent
3a6c9259a0
commit
507c7cac11
1 changed files with 6 additions and 0 deletions
|
|
@ -225,6 +225,8 @@ namespace MareSynchronosServer.Hubs
|
|||
}).ConfigureAwait(false);
|
||||
}
|
||||
await streamingCall.RequestStream.CompleteAsync();
|
||||
tempFileStream.Close();
|
||||
await tempFileStream.DisposeAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -232,6 +234,10 @@ namespace MareSynchronosServer.Hubs
|
|||
_dbContext.Remove(relatedFile);
|
||||
await _dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
File.Delete(tempFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue