how to upload >4GB file using c#
hi,
i need upload >4gb in networkfileshare.
i used filestream object , spllited file , saveed in networkshare.but taking more time.
i need on how upload 4gb files chunks using c#
my code
filestream foption = new filestream(strfilename, filemode.open);
len = foption.length;
eachsize = (int)math.ceiling((double)len / x);
foption.close();
filestream infile = new filestream(strfilename, filemode.openorcreate, fileaccess.read);
(int = 0; < x; i++)
{
filestream outfile = new filestream(strdir + "\\" + + ".zip", filemode.openorcreate, fileaccess.write);
int data = 0;
byte[] buffer = new byte[eachsize];
if ((data = infile.read(buffer, 0, eachsize)) > 0)
{
//outfile.name = convert.tostring(configurationmanager.appsettings["zippath"]);
outfile.write(buffer, 0, data);
}
outfile.close();
}
hi
try below sample
http://jeanpaulva.com/tag/c-2/
http://www.asp.net/ajaxlibrary/ajaxcontroltoolkitsamplesite/asyncfileupload/asyncfileupload.aspx
regards
sneha
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment