Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can anyone tell me about how to reduce uploading time of a big excel file
Posted
Comments
[no name] 25-Jun-14 7:07am    
Get a faster connection?

1 solution

The uploading time depends on your speed of net, if it is a webapplication.

But you can use threading for uploading file. because threading is multitasking concept, so you can use it. It will make you feel that the loading is faster.

though you see this code


Stream writer = request.GetRequestStream();
byte[] bufferUploadSize = new byte[4096];//ex.
FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
int bytesRead = 0;
while ((bytesRead = fileStream.Read(bufferUploadSize,0, bufferUploadSize.Length)) != 0)
{
    writer.Write(bufferUploadSize, 0, bytesRead);
}
fileStream.Close();


and make one virtual property
public virtual bool AllowWriteStreamBuffering { get; set; } 
to false,

you can read msdn link
 
Share this answer
 
Comments
Member 10891595 25-Jun-14 7:46am    
but this application is not web based it is window based application sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900