Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I Extend the maximum file size to upload and send (via email) files while using jquery.MultiFile.js

I'm using a plugin from jquery to use a multiple file upload to create a program that sends e-mails..

Check the source

http://www.fyneworks.com/jquery/multiple-file-upload/

I downloaded it here, and I have not modified it yet...

I've noticed that you cannot upload more than 10MB in total, however, you're not allowed to send a single file that is over 4MB...

I have already been told that it's OK that you can't send over 10MB in files, but my boss just tried to send a pdf file that is 4.11MB, and it doesn't send it....

I tried it to send it via Visual Studio (that way I can debug it and see where the problem is... apparentely, once I have attached the file and click on SEND EMAIL... the program doesnt acces the page load nor the button, it just states that connection has been reset...

If you try to send (not using Visual Studio, but from the internet)... it sends this error

Maximum request length exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Maximum request length exceeded.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Maximum request length exceeded.]
   System.Web.HttpRequest.GetEntireRawContent() +9037851
   System.Web.HttpRequest.GetMultipartContent() +68
   System.Web.HttpRequest.FillInFormCollection() +247
   System.Web.HttpRequest.get_Form() +104
   System.Web.HttpRequest.get_HasForm() +9038959
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
   System.Web.UI.Page.DeterminePostBackMode() +69
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135

I have already check the jquery files, but I can't seem to find anything that could resolve the problem.

Do you know where can the problem be? and how do I fix that issue?

like image 609
Victor Avatar asked Jan 15 '23 06:01

Victor


1 Answers

Modify the web.config settings of httpRuntime element like below

<httpRuntime maxRequestLength="4096" />

The value is in KB. By default it is 4 MB.

like image 78
Tariqulazam Avatar answered Jan 30 '23 01:01

Tariqulazam