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();
                        }



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'