Uploadify - Troubleshooting

Each time an error occurs the OnCancel event is triggered.  The error text is available on the control Error property.  The following detail shows the most common errors and their causes.  

  • Error 404
    The service that serves the uploads is not found (upload.dll or upload.jar) or the file uploaded exceeded the size allowed by the web server.
    If the UploadScript UserControl property is modified, the URL may be wrong. This property is only recommended to be changed in case of error or required to develop a special architecture, otherwise leave it empty.
    • .NET
      Type the URL of the application; <application URL>/upload.aspx , you should see a blank screen. In case of error check if the resource "upload.dll" exists in the web/bin folder.
      If the error only occurs with large files (greater than 4 Mb) , try to set a higher "maximum request size" value in the web.config file.
      The maximum request size is set in kilobytes. The default size is 4096 KB (4 MB).
      Example: 
      <system.web>
            <httpRuntime executionTimeout="600" maxRequestLength="20120"/>
      
      If the error occurs with any files, check ".Net Application Namespace" property. If the value is not the default one (GeneXus.Programs), add this handlers in the web.config:
      <add name="GeneXus.Programs.upload" verb="*" path="upload.aspx" type="GeneXus.Programs.upload,upload" />
    • Java
      Type the URL of the application; <application URL>/upload , you should see a blank screen. In case of error check if the resource "upload.jar" exists in the webapp lib folder.
      If the error occurs only with large files, check your server configuration. For Tomcat 7 or later edit the web.xml file in the webapp and add:
      <servlet>
            <servlet-name>upload</servlet-name>
            <servlet-class>upload</servlet-class>
      </servlet>
      
      <servlet-mapping>
            <servlet-name>upload</servlet-name>
            <url-pattern>/servlet/upload</url-pattern>
      </servlet-mapping>
  • Error 500
    Temporary files are saved in the same folder as GeneXus stores blobs, using the same logic to create temporary names.
    It could fail when the "Temp media directory" property is not set correctly or the user executing the application does not have write permissions on the folder.
    • .NET
      Make sure the user running the application (IIS) has permissions on the folder "private" within the "web" folder.
    • Java
      If the message has no more detailed description than "HTTP"; is probable that a jar file is missing. Copy the folder "drivers" of your model to the webapp's lib.
      If a description is displayed, it will probably detail it is a permission error or the path is not found. Check path and permissions for the folder associated to the generator "Temp media directory" properties.
  • #2038: IO
    If the UploadScript UserControl property is changed, maybe the URL is malformed, if you are in Java, use the absolute URL or start it with "../" like "../servlet/upload"
  • File Size
    The size of the file to upload is higher than the value set in the "sizelimit" property.
  • Error 302
    Occurred a redirect. This case has been detected. NET if the property "SessionState" in the web.config has the property value to "cookieless" in "autodetect". To fix this, change this value to the default value "false".
  • Progress bar not displayed (when migrating from version 1.5)
    This error can occur if the variable QueuedFiles is not defined (UploadifyOutput collection) and/or not associated with the control (QueuedFiles property).
  • "HTTP Error" in Java
    Reviewing the tomcat log found the following error:
    org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet invoker threw exception
    java.lang.NoSuchMethodError: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest
    (Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List;
    at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest
    (ServletFileUpload.java:126)

    at upload.doPost(upload.java:98)

    Try removing the folder "fileupload" of GXClassR (located inside the gxclasses: \org\apache\commons\fileupload).
    See: http://marketplace.genexus.com/question.aspx?22

  Java using Tomcat 7.0 or later with  “Use annotations for servlet definition” Edit the web.xml file in the webapp and add:

<servlet>
      <servlet-name>upload</servlet-name>
      <servlet-class>upload</servlet-class>
</servlet>

<servlet-mapping>
      <servlet-name>upload</servlet-name>
      <url-pattern>/servlet/upload</url-pattern>
</servlet-mapping>

  I can't upload files larger than 4 MB (.NET) Try to set a higher "maximum request size" value in web.config file.  The maximum request size in kilobytes. The default size is 4096 KB (4 MB). Example:

<system.web>
    <httpRuntime executionTimeout="600" maxRequestLength="20120"/>

  Java using JBOSS If the server is JBOSS you should edit the web.xml as say above with Tomcat7.0. Also you will need to add the commons-fileupload.jar in the lib directory. Download it from: http://commons.apache.org/fileupload/download_fileupload.cgi

Releated pages: