Multiworld

This commit is contained in:
2025-03-13 21:51:53 -05:00
parent 13042ec841
commit fd2e8190c3
9 changed files with 262 additions and 39 deletions

View File

@@ -27,11 +27,15 @@
await BlobClient.UploadBlobAsync(name, data);
}
public async Task UploadFileAndDelete(string name, string filepath) {
public async Task UploadFileFromSource(string name, string filepath) {
using (var stream = new FileStream(filepath, FileMode.Open, FileAccess.Read)) {
this.Logger.LogDebug("Uploading file {filepath} -> {name}", filepath, name);
await this.UploadFile(name, stream);
}
}
public async Task UploadFileAndDelete(string name, string filepath) {
await this.UploadFileFromSource(name, filepath);
this.Logger.LogDebug("Deleting file {filepath}", filepath);
File.Delete(filepath);