Author: seang_sophorn | Posted on: 5/27/2010 11:03:52 PM | Views : 292

I have a page posting data to me via HTTP POST. What i want is write posted data into mp4 video format file.
Here my code how to write that file:
string strFilePath = "D:\\Video.mp4";

using (FileStream fs = new FileStream(strFilePath, FileMode.Create))
{
    byte[] bytes = new byte[Request.InputStream.Length];
    Request.InputStream.Read(bytes, 0, (int)Request.InputStream.Length);
    fs.Write(bytes, 0, bytes.Length);
}
My problem is that i got the file, but it's corrupt when playback. Is there any problem with my stream or i missing some decode for mp4 file?
any help much appreciated.
thanks in advance.

...

Go to the complete details ...