Tony Guru Deepak F

Hi everyone,

I have a problem in my webpart failing to upload files > 50 MB to server (to file system).

This is a custom webaprt that will copy files to server (FileSystem) and does not save in Content DB.

Is that something in relation with Sharepoint or my custom webpart

Thanks and Regards

Tony Guru Deepak.F



Re: SharePoint - Development and Programming Webpart fails to upload files

Gaurav Rehan

Might sound silly, but have you checked the max upload size allowed for a document setting. This setting is available through central administration.

On other note...you have mentioned that you have Filesystem configured as the destination for file (and not Content Database). I too want to try that. How can I do this

Thanks,

Gaurav






Re: SharePoint - Development and Programming Webpart fails to upload files

Jian Zhang

I always find the file uploading in asp.net solution a very hard topic, as IIS , not like Apache , will take in the file in one go instead of reading them byte after byte. So basically you need to check the httprequest size (just approximately, the httprequest size is the close to the size of your file) and throw the custom exception on server side. But this is awkward, I think using Javascript to check the file size at client side is much more desirable. I don't think there's a 50MB max limitation for sharepoint, since the native asp.net 2 application will take max 4GB and sharepoint is just a asp.net 1or 2 application in nature. I agree with Gaurav that there should be some settings in central admin for this. Please let me know if you guys find anything





Re: SharePoint - Development and Programming Webpart fails to upload files

Tony Guru Deepak F

Hey thanks for both of you.

I fixed the issue.

It was a web.config setting - I increased the "maxRequestLength="2097151" " in httpRuntime tag.

The problem was that upload was working fine but attachments were not.

There are two web.configs

1. in layouts folder

2. in Inetpub for web application

Upload.aspx gets the setting over ridden from the web.config in layouts folder so it was working fne. But attachments is different and i had to make the changes in the web.config in inetpub.

Thanks and Regards

Tony Guru Deepak.F





Re: SharePoint - Development and Programming Webpart fails to upload files

Bowsil

hi ,

i had the problem when i wastrying to upload more than 200 mb. even though i have done nes...change in config file

my case was to upload more that 2 gb of data. by defalt sharepoint allows only max of 2 gb...

then i got the solution we can use external tool. that we can integgrated with the custom webpart

i had gotsucess in uploaing more than 2 gb of data... i used Curl.net sdk to prform this. no needof any confg.....

here is the link for Curl.net

https://sourceforge.net/projects/net-simplecurl/

this willhelp u sure... this work 100 %...

thx.

Bowsil Ameen

Microsoft IDC Hyderabad






Re: SharePoint - Development and Programming Webpart fails to upload files

Peter ebSms

It's a good idea to investigate IIS system memory usage if many users are uploading large files at the same time. If you are short on system memory in peak times your IIS even may get stuck. In these cases i use a third party component instead of using the standard method (e.g. Softartisans FileUp).

Good luck and Greetings, Peter





Re: SharePoint - Development and Programming Webpart fails to upload files

ShajiV

Hi All -- Do you have any samples of how to implement FileUp with SharePoint 2007 document library. From looking at the FileUp documentation it looks like there is some coding involved. Any help is appreciated.

Thanks

Shaji.





Re: SharePoint - Development and Programming Webpart fails to upload files

Peter ebSms

Sorry. Just for uploading a file to the filesystem of the server. That's what the thread was about.

As you can see from the documentation it's simple when using the following form-type in your upload.aspx.

<form enctype="multipart/form-data" method="post" action="uploaded.aspx">
Enter filename to upload: <input type="file" name="f1"><br>

<input type="submit">

</form>

In uploaded.aspx use the following code in the Page_Load event handler

FileUp oFileUp = new FileUp(Context);

oFileUp.Path = "c:\temp"
oFileUp.SaveAs "c:\uploads\upload.out"
oFileUp.Dispose()

In the samples is an ADO.NET example of how to upload a file to SQL Server as blob.

Peter




Re: SharePoint - Development and Programming Webpart fails to upload files

Peter ebSms

If it's possible, install a SharePoint-compatible Programm on Client-Side ;-)

Than you can stick to the STSUpld UploadCtl Class (e.g. C:\PROGRA~1\MICROS~2\Office12\STSUPLD.DLL, document.getElementById("idUploadCtl").MultipleUpload(); ) which will than automatically be used for uploading multiple documents (and can also be used to upload just a single document).

Check memory consumption on server side when uploading large files with this method instead of using a single file upload without the STSUpld.UploadCtl.

Peter