Ajax FileUpload, the files are always waiting

0

Ajax FileUpload statement in Aspx File:

<ajaxToolkit:AjaxFileUpload runat="server" ID="fluAsistencias" MaximumNumberOfFiles="12" OnUploadComplete="fluAsistencias_UploadComplete" AllowedFileTypes="jpg,jpeg,png" />

UploadComplete Event Declaration in Aspx.cs File:

protected void fluAsistencias_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
    string fileName = Path.GetFileName(e.FileName);
    string serverPath = "";

    serverPath = Server.MapPath("~/Archivos/Clientes/VIRUTEX/Imagenes/Asistencia");

    if (!Directory.Exists(serverPath))
    {
        Directory.CreateDirectory(serverPath);
    }

    fluAsistencias.SaveAs(serverPath + fileName);
}

Declaration of Handlers in web.config file:

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
  <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</handlers>
</system.webServer>

<system.web>
    <httpHandlers>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
      <add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
    </httpHandlers>
 </system.web>

The problem is the following, I have all the previous code in my ASP.net site, the problem is that the UploadComplete event is not firing, since the images that are loaded in the control do not go beyond the legend that says "Pending", attached image:

I have already tried removing all the handlers if there was one more and it still does not work.

I already noticed that the libraries are well loaded and updated for this control.

I hope you can help me.

    
asked by IngErick 21.06.2017 в 18:44
source

0 answers