Stripes

Autodiscovery of MultipartWrapper class

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None

Description

Stripes should attempt to automatically determine which file upload provider is available. The configuration parameter MultipartWrapper.Class should override everything, but in the absence of the config param RuntimeConfiguration should check first if COS is available on the classpath and then if Commons FileUpload is available. If all three of these fail then it should throw an exception. This way all a developer has to do is drop Commons FileUpload in the lib directory to get it working.

Activity

Hide
Ben Gunter added a comment - 23/Jan/08 11:13 AM

Come to think of it, an exception should only be thrown if the code actually tries to use the MultipartWrapper and one can't be found. There are plenty of apps that don't use multipart requests at all.

Show
Ben Gunter added a comment - 23/Jan/08 11:13 AM Come to think of it, an exception should only be thrown if the code actually tries to use the MultipartWrapper and one can't be found. There are plenty of apps that don't use multipart requests at all.
Hide
Ben Gunter added a comment - 24/Jan/08 4:18 PM

If no wrapper is configured then DefaultMultipartWrapperFactory tries Commons and then COS, using the first one to load successfully. Changes were made to those two implementations to ensure they do not load if the supporting library is not present on the classpath.

Show
Ben Gunter added a comment - 24/Jan/08 4:18 PM If no wrapper is configured then DefaultMultipartWrapperFactory tries Commons and then COS, using the first one to load successfully. Changes were made to those two implementations to ensure they do not load if the supporting library is not present on the classpath.

People

Vote (0)
Watch (0)

Dates

  • Created:
    23/Jan/08 10:28 AM
    Updated:
    04/Jan/11 3:10 PM
    Resolved:
    24/Jan/08 4:18 PM