mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-01 02:53:46 +12:00
Properly download stuff to memory
This commit is contained in:
parent
4b69295fda
commit
3a9b80afdb
|
@ -72,7 +72,10 @@ namespace VRCMelonAssistant
|
|||
internal static async Task<Stream> DownloadFileToMemory(string link)
|
||||
{
|
||||
using var resp = await Http.HttpClient.GetAsync(link);
|
||||
return await resp.Content.ReadAsStreamAsync();
|
||||
var newStream = new MemoryStream();
|
||||
await resp.Content.CopyToAsync(newStream);
|
||||
newStream.Position = 0;
|
||||
return newStream;
|
||||
}
|
||||
|
||||
public static async Task InstallMod(Mod mod)
|
||||
|
|
Loading…
Reference in a new issue