I am reading data from an IPhone App that uses http POST to transfer the image to the Server I can read this into a an binary and it does write to a file (See below) the issue I have is when I open the image it fails.
You can see the code from the Iphone on this post: http://stackoverflow.com/questions/1547967/asp-http-post-read-data
Code:
byte[] buffer = new byte[Request.ContentLength];
using (BinaryReader br = new BinaryReader(Request.InputStream))
br.Read(buffer, 0, buffer.Length);
string fileName = @"C:\test\test.jpg";
FileStream fs = new FileStream(fileName, FileMode.Create,
FileAccess.ReadWrite);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(buffer);
bw.Close();
The image Content-Type is application/octet-stream
Can anyone shine any light onto this please.