Uploaded image for project: 'Turbine'
  1. Turbine
  2. TRB-10

Make Intake file uploads work in fulcrum

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Later
    • Core 4.0-M1
    • None
    • Core, Fulcrum
    • None

    Description

      init() in FileItemField invokes the parser's containsKey() method to determine whether the incoming request contains a file item for the FileItemField. The containsKey() method that gets invoked is inherited by DefaultParameterParser from BaseValueParser and searches the "parameters" attribute also inherited from BaseValueParser. However, file items are kept in DefaultParameterParser's "fileParameters" attribute. Hence, containsKey() never reports "true" for file items.

      My suggested fix is to simply add a containsKey() function to DefaultParameterParser, which also searches "fileParameters":

      public boolean containsKey(Object key)
      {
      return super.containsKey(key) || fileParameters.containsKey(convert((String)key));
      }

      With this fix, file uploads for file upload fields marked as "required" work.

      Scarab issue TTWS65 was created by Thomas Lopatic (thomas at lopatic dot de).

      Attachments

        Activity

          People

            tv Thomas Vandahl
            seade Scott Eade
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: