We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3addbc commit cc6d7e2Copy full SHA for cc6d7e2
Connection/RESTConnector.cs
@@ -121,12 +121,10 @@ public Form(int n)
121
/// <param name="contents">The binary data.</param>
122
/// <param name="fileName">The filename of the binary data.</param>
123
/// <param name="mimeType">The mime type of the data.</param>
124
- public Form(System.IO.FileStream contents, string fileName = null, string mimeType = null)
+ public Form(System.IO.MemoryStream contents, string fileName = null, string mimeType = null)
125
{
126
IsBinary = true;
127
- System.IO.MemoryStream ms = new System.IO.MemoryStream();
128
- contents.CopyTo(ms);
129
- Contents = ms.ToArray();
+ Contents = contents.ToArray();
130
FileName = fileName;
131
MimeType = mimeType;
132
}
0 commit comments