Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3562

FileUploadInterceptor: File not uploaded when file is empty (0 bytes)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.1.1
    • 2.3.1
    • Core Interceptors
    • None
    • Windows 7 64-bit or Windows XP with either Tomcat or Jetty Web Container

    Description

      When a user uploads a file that is emtpy (0 bytes), the actual file is not copied to the web container's "work" directory. All other information about the file is copied though (e.g. contentType, fileName). Although the file is emtpy file.exist() should still equal "true". I have attached a demo app that demostrates the issue. IMO, an empty file should be treated just like a non-empty file.

      Attachments

        1. StrutsUploadTest.zip
          10 kB
          Burton Rhodes

        Activity

          People

            maurizio.cucchiara Maurizio Cucchiara
            burtonrhodes Burton Rhodes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified