How to Upload 100MB file?
NickName:Amit Ask DateTime:2011-04-29T03:27:22

How to Upload 100MB file?

I am designing a File Server application in ASP.NET. I have to upload a file of size 100MB and then save it into SQL Server 2008 database in varbinary(max). Saving file in DB is must. I am using FileUpload control. Please suggest me how to handle such large file?
UPDATE
Any code example would be great help, any code sample?
How to read file in chunks?

Copyright Notice:Content Author:「Amit」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/5823896/how-to-upload-100mb-file

Answers
Ferruccio 2011-04-28T19:32:24

ASP.NET has a default limit of 4MB for file uploads. This article describes how to change that default and discusses some of the issues with uploading large files.",


marcoaoteixeira 2011-04-28T19:31:40

Try this: Large file uploads in ASP.NET.\n\nLet me know if it helps.",


Michael Levy 2011-04-28T19:47:35

Years ago (in ASP 1.1?), I used this control and it was great. \n\nSee\nhttp://krystalware.com/Products/SlickUpload/\n\nhttp://krystalware.com/Products/SlickUpload/Documentation/concepts/uploading-sql-server.aspx",


Nik 2011-04-28T19:29:17

Because you are using SQL Server 2008 with its 2gb maximum for varbinary columns, you should be fine. Any regular upload script will probably work. When you get into uploads of that size though, underlying HTTP or TCP/IP connections can become a problem, but there really isn't anything you can do about that.",


Brian MacKay 2011-04-28T19:37:08

You can change the default limit (4mb) for a directory and its children by dropping a special web.config into that directory. That way you don't have to make your whole site allow huge uploads (doing so would open you up to a certain kinds of attacks).\n\nHere's an example from a production app. This one is set for 200mb:\n\n<?xml version=\"1.0\"?>\n<!-- Nested this web.config here to allow for huge uploads (up to 200mb) -->\n\n<configuration>\n <system.web>\n <httpRuntime maxRequestLength=\"200000\"/>\n </system.web>\n</configuration>\n\n\nNesting web.configs does not have any negative side-effects -- your existing web.config settings will still work site-wide, and from this directory on down, these httpRuntime settings will be inherited.\n\nOn the page that handles the upload, make sure you have a higher than normal ScriptTimeout. This is measured in seconds:\n\nServer.ScriptTimeout = 1200;\n\n\nI like setting this on the page rather than web.config because it isolates the increased timeout down to just this one page. \n\nOn the SQL side, varbinary columns can be up to 2 gigs so you're good to go there.\n\nUpdate: I've used this approach with 50+ meg files, but it's possible that at the 100 meg point the standard methods might break down. There are a lot of third party controls available that could take over from there, but I would probably look hard at Telerik's RadUpload since they're a quality name and it looks very polished: RadUpload\n\nAs for your update regarding reading the file in chunks, if you really want to write that yourself, Bobby D pointed out this article: Uploading Large Files Using an HttpModule",


More about “How to Upload 100MB file?” related questions

How to Upload 100MB file?

I am designing a File Server application in ASP.NET. I have to upload a file of size 100MB and then save it into SQL Server 2008 database in varbinary(max). Saving file in DB is must. I am using

Show Detail

Upload file larger than 100MB in Flex

I want to upload larger than 100 MB local file and then send it to remove Java server. I got these possible alternatives: Use FileReference Flex class, which is not recommended for files larger t...

Show Detail

How to upload file (100MB to 1 GB) in server using java multithreading concept?

I implemented uploading functionality in my project using spring and web services. I am able to upload a 30MB file but it takes time to upload. Now I want to upload a file bigger than 100MB but in ...

Show Detail

C#: Archiving a File into Parts of 100MB

In my application, the user selects a big file (>100 mb) on their drive. I wish for the program to then take the file that was selected and chop it up into archived parts that are 100 mb or less. H...

Show Detail

Jquery file upload ... freezes more than 100MB # blueimp jquery file upload

i wanted to upload bigger files using jquery file upload from blueimp. it is fine for smaller files but for big files &gt;100mb it doesnt seem to be doing anything. The progress bar doesnt move it...

Show Detail

Unable to upload 100MB file using ServletFileUpload

I have to upload the 100MB file. My front end part is Angular 4 and backend part is in Java and Spring 4 . I have exposed it as REST endpoint. Once i upload the file after sometime the connection get

Show Detail

How to show progress bar in PHP where i have to upload the file size of of 100MB? without APC

How to show progress bar in PHP where i have to upload the file size of of 100MB? I cannot have APC installed. I am allowed to do so.. Help me out to get it done... P.S > I DO NOT HAVE DEDICATED S...

Show Detail

Upload load big size file in PHP

I need to upload big size file by web page in PHP, as I surveyed, there are three variables related to upload. post_max_size=100MB upload_max_filesize=100MB memory_limit If I want to upload file ...

Show Detail

Amazon S3 Multipart upload files larger than 100mb

I am trying to upload files larger than 100mb to Amazon S3 and for that I need multipart upload. I tried with the documents given but I discovered that was an old version of Amazon SDK. So i found ...

Show Detail

Face Problem while uploading upto 100MB files

I am having a problem while uploading upto 100mb files in PHP. less then 100mb file working fine. In php.ini file. i set these value upload_max_filesize 500M post_max_size 800M max_execution_time...

Show Detail