1

I have an MVC3 C#.Net web app. In my HTML View, I am using the standard Windows file input

<input style="border:thin solid #ccc;width:270px; background-color: #FFFFFF;" type="file" name="Name" id="Name"/>

It's working fine except for big files. I can upload a 2mb file bit not a 4mb file. Is there a max file size for this input type or can I set the maxsize somehow?

1 Answer 1

5

Try changing the maxRequestLength in your web.config.

<system.web>
  <httpRuntime maxRequestLength="4096" />
</system.web>

The value is in kilobytes. 4096 is actually the default value, your file might be slightly larger so maybe try a higher number.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.