How to upload large files using MVC 4?

In web.config you need these (2GB all around): <system.web> <compilation debug=”true” targetFramework=”4.5″ /> <httpRuntime targetFramework=”4.5″ maxRequestLength=”2147483647″ executionTimeout=”1600″ requestLengthDiskThreshold=”2147483647″ /> <security> <requestFiltering> <requestLimits maxAllowedContentLength=”2147483647″ /> </requestFiltering> </security> … </system.web>

Handling plupload’s chunked uploads on the server-side

Here is the way to parse the chunks, and store the result in $upload_file (change $uploaded_file to match what you need). $uploaded_file=”/tmp/uploadFile.jpg”; $chunks = isset($_POST[“chunks”]) ? $_POST[“chunks”] : 0; // If we have a chunked operation… if ($chunks > 0) { // Get the chunk number… $chunk = isset($_POST[“chunk”]) ? $_POST[“chunk”] : 0; if ($chunk … Read more