section of code when looking in the debugger, input is still empty.
Expand|Select|Wrap|Line Numbers
- HttpPostedFile MyFile;
- int FileLen;
- System.IO.Stream MyStream;
- MyFile = inputFileControl.PostedFile;
- FileLen = MyFile.ContentLength;
- byte[] input = new byte[FileLen];
- // Initialize the stream.
- MyStream = MyFile.InputStream;
- // Read the file into the byte array.
- MyStream.Read(input, 0, FileLen);
Expand|Select|Wrap|Line Numbers
- HttpPostedFile MyFile;
- int FileLen;
- System.IO.Stream MyStream;
- MyFile = inputFileControl.PostedFile;
- FileLen = MyFile.ContentLength;
- byte[] input = new byte[FileLen];
- MyFile.SaveAs("c:\\tempName.jpg");
- // Initialize the stream.
- MyStream = new Stream("c:\\tempName.jpg", FileAccess.Read);
- // Read the file into the byte array.
- MyStream.Read(input, 0, FileLen);
Either way when I look at the debugger the MyStream object is filled with
content, but one way the read doesn't seem to work, the other way it does.