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

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user