0

There are many samples of c# code showing how to upload a file when a stream is being read from file on disk.

So I think I need to do a new Stream, but I do not understand what this means:

StreamReader sourceStream = new StreamReader(Stream stream)
Yu Hao
  • 119,891
  • 44
  • 235
  • 294

1 Answers1

0

It was simple!

The StreamReader is to read a file into a stream. I did not need to worry about that.

I just needed to do the following:

byte[] stringContents = Encoding.UTF8.GetBytes("My string data");