Tuesday, September 14, 2010

Uploading large files to Sharepoint



I've stumbled upon a problem when I tried to upload 200MB file into SharePoint Video library. Error message was: "The form submission cannot be processed because it exceeded the maximum length allowed by the Web administrator. Please resubmit the form with less data."

By the book - you should change Maximum Upload Size field of desired web application. This is how you do it.

By default SharePoint allows a maximum file size of 50MB that can be uploaded into any document library. This might be too much as you might not want users downloading 50MB files over your LAN/WAN. Anyway, to change the maximum file size

1. Goto SharePoint Central Administration > Select Application Management
2. Under SharePoint Web Application Management - select Web application general settings
3. Select your web application (usually you would select app. running on port 80)
4. Change the value of the Maximum Upload Size in MB's.

This should work but it didn't work for me on my default/standard MOSS 2007 installation. Read on to find out what else is needed if this doesn't help you.

Changing Maximum Upload Size to 200MB wasn't enough for me although the file I was uploading was 166MB!? What now?

This was happening because the web.config of the application was blocking the change in Sharepoint Central Management. I had to change the web.config of the defualt application (working on port 80) and the web.config located in 12Hive folder which is located in C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS.

I've searched both web.configs for the "" code. After I found this line in web.config I've done two things:

1. I've added executionTimeout="999999" code for timeout time to support longer uploads due to support for bigger file size.
2. I've changed the default code maxRequestLength="51200" to support larger files.

Before change, the code was:





After changing this line, the code was:




After I changed this I was able to upload my 166MB video to Sharepoint.

Hope this was helpfull.