Skip to content

Commit

Permalink
refactor admin upload/download
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-jmattson committed Sep 26, 2024
1 parent b9e669f commit 337eaea
Show file tree
Hide file tree
Showing 2 changed files with 242 additions and 447 deletions.
4 changes: 2 additions & 2 deletions src/TopoMojo.Api/Features/Admin/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public async Task<ActionResult<string[]>> ImportWorkspaces()
public async Task<ActionResult> DownloadWorkspaces([FromBody] string[] ids)
{
string srcPath = fileUploadOptions.TopoRoot;
(var byteArray, var fileName) = await transferSvc.Download(ids, srcPath);
return File(byteArray, "application/zip", fileName);
var stream = await transferSvc.Download(ids, srcPath);
return File(stream, "application/zip", "topomojo-export.zip");
}

/// <summary>
Expand Down
Loading

0 comments on commit 337eaea

Please sign in to comment.