Reset position when uploading file from temp stream

This commit is contained in:
RogueException
2017-03-31 01:47:42 -03:00
parent 5a1beeeb66
commit 5aa92f8954

View File

@@ -106,6 +106,7 @@ namespace Discord.Net.Rest
{
var memoryStream = new MemoryStream();
await stream.CopyToAsync(memoryStream).ConfigureAwait(false);
memoryStream.Position = 0;
stream = memoryStream;
}
content.Add(new StreamContent(stream), p.Key, fileValue.Filename);