Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-251

DiskFileItem#getTempFile() is broken

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.1
    • 1.4
    • None

    Description

      DiskFileItem#getTempFile() looks wrong.

      Presumably the intention of providing the protected method was to allow the generation of the path name to be overwritten. This can indeed be done.

      However, if this is done, the tempFile variable will not be set up, so the path name won't be cached - unless the overriding method also caches the name.

      The file name needs to agree with the DeferredFileOutputStream that is created. This is implied in the Javadoc, but is not currently enforced.

      The protected method needs to implement the name generation part only.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment