Mar 07, 2013, 5:51 AM
[CLOSED] File Uploader Not working for Large files(more than 2 MB)
Trying to browse the file with the help of FileUploader. On Save button calling "BrowseFile" action.For file upto 2 MB its working fine.But for the bigger file the Browse File action is not getting called.
I have mentioned following in Web.config.Is there any other setting need to be done?
I have mentioned following in Web.config.Is there any other setting need to be done?
<bindings>
<basicHttpBinding>
<binding maxReceivedMessageSize="1006710886">
<readerQuotas maxStringContentLength="5242880" maxArrayLength="1006710886" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<div>
@(Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig))
@( this.Html.X().FormPanel()
.ID("UserFromPanel")
.Url(Url.Action("BrowseFile"))
.DefaultAnchor("100%")
.Border(false)
.BodyStyle("margin-top: -10px;padding:10px")
.Cls("x-custom-panel")
.ButtonAlign(Alignment.Center)
.Items
(
Html.X().Container()
.Border(false)
.Layout(LayoutType.HBox)
.LayoutConfig(new HBoxLayoutConfig{Align= HBoxAlign.Top})
.Items(
Html.X().FileUploadField().ID("file_browse").Width(495).ButtonText("Browse"),
Html.X().Button().Text("Save").Padding(5).Width(100).ID("btnSave")
.DirectEvents(de => {
de.Click.Url = Url.Action("BrowseFile","ExtNet");})
)
))
</div>
Controller
[HttpPost]
public ActionResult BrowseFile(string file)
{
if (HasFile(Request.Files["file_browse"]))
{
}
return View();
}
Last edited by Daniil; Mar 12, 2013 at 5:42 AM.
Reason: [CLOSED]