R
r0main
Hi,
I'm facing an issue to send data throught the HttpWebRequest processing,
I'm using the Method POST with a multipart form/data.
While writing a file, my application is buffering the whole size of the
file, and it sends it... That's pretty sucks with large file.
while ((bytesWritten = fileStream.Read(b, 0, 4096)) > 0)
{
newStream.Write(b, 0, bytesWritten);
newStream.Flush();
this.singleFileProgressBar.PerformStep();
}
newStream.Close();
I thought this piece of code will resolve my problem, but the Flush()
Method must be overrided.
How to flush the data on each turn during my loop ?
How can I override the Flush() Method ? I really don't know what to code
inside of it.
Thanks !
I'm facing an issue to send data throught the HttpWebRequest processing,
I'm using the Method POST with a multipart form/data.
While writing a file, my application is buffering the whole size of the
file, and it sends it... That's pretty sucks with large file.
while ((bytesWritten = fileStream.Read(b, 0, 4096)) > 0)
{
newStream.Write(b, 0, bytesWritten);
newStream.Flush();
this.singleFileProgressBar.PerformStep();
}
newStream.Close();
I thought this piece of code will resolve my problem, but the Flush()
Method must be overrided.
How to flush the data on each turn during my loop ?
How can I override the Flush() Method ? I really don't know what to code
inside of it.
Thanks !