This is my upload.cshtml which upload multiple files. I have three problems with these code,

  1. I need a textbox to be added every time when "Add Another File: is clicked
  2. I need progress bar while files are getting uploaded(uusing JS/jquery)
  3. Need to upload files of 1 GB. Currently 250mb works, but not 600 mb

I have added this in web.config,

<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="2097152" useFullyQualifiedRedirectUrl="true" executionTimeout="40000" requestLengthDiskThreshold="2147483647" />

View:-

@using Microsoft.Web.Helpers;
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>

@using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @FileUpload.GetHtml(
        initialNumberOfFiles: 1,
        allowMoreFilesToBeAdded: true,
        includeFormTag: false,
        addText: "Add another file")
    <br/>
    <input type="submit" value="Upload" id="upload" />
}
<div style="color:Red;font-size:14px">@Html.Raw(HttpUtility.HtmlDecode(ViewBag.Message))</div>

Please help..

Related posts

Recent Viewed