diff --git a/spring-webflow-reference/src/actions.xml b/spring-webflow-reference/src/actions.xml index 33e885e1..1a39f45c 100644 --- a/spring-webflow-reference/src/actions.xml +++ b/spring-webflow-reference/src/actions.xml @@ -399,6 +399,59 @@ public class PrintBoardingPassAction extends AbstractAction { In this example, when the print event is raised the flow will call the printBoardingPassAction. The action will render the PDF then mark the response as complete. + + + Handling File Uploads + + Another common task is to use Web Flow to handle multipart file uploads in combination with Spring MVC's + MultipartResolver. Once the resolver is set up correctly as described here and the submitting + HTML form is configured with enctype="multipart/form-data", you can easily handle the file upload in a + transition action. Given a form such as: + + + Select file: + +]]> + + + and a backing object for handling the upload such as: + + + + + you can process the upload using a transition action as in the following example: + + + + + + + +]]> + + + The MultipartFile will be bound to the FileUploadHandler bean as + part of the normal form binding process so that it will be available to process during the + execution of the transition action. + \ No newline at end of file