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

FileCountMax creates an impression it's only about file attachments

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Setting fileCountMax affects also requests with only form fields resulting in:

      org.apache.commons.fileupload.FileCountLimitExceededException: attachment

      Not sure if the ATTACHMENT constant is used here intentionally or by mistake:

      https://github.com/apache/commons-fileupload/pull/185/commits/b00fd89614db15357172a0fbed46de420ec9acb5#diff-90d30ad81e55682e532edd637107f983587cd6db8ebf8c5625ea6d9ff616cbfeR320

       

      Could fileCountMax has a different name to avoid the confusion?

      Workaround

      • Extend ServletFileUpload and expose a different setter for the  fileCountMax property
      • Catch and re-throw FileCountLimitExceededException with a less confusing description.

       

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            rkovarik Roman Kovarik

            Dates

              Created:
              Updated:

              Slack

                Issue deployment