diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 40c5b6747..36aeda5ca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Changelog * Custom document model is now documented (Emily Horsman) * Use minified versions of CSS in the admin by adding minification to the front-end tooling (Vincent Audebert, Thibaud Colas) + * Wagtailforms serve view now passes `request.FILES`, for use in custom form handlers (LB (Ben Johnston)) * Fix: "Open Link in New Tab" on a right arrow in page explorer should open page list (Emily Horsman) * Fix: Using `order_by_relevance=False` when searching with PostgreSQL now works (Mitchel Cabuloy) * Fix: Inline panel first and last sorting arrows correctly hidden in non-default tabs (Matt Westcott) diff --git a/docs/releases/1.13.rst b/docs/releases/1.13.rst index c90a58e5e..d3093dbb2 100644 --- a/docs/releases/1.13.rst +++ b/docs/releases/1.13.rst @@ -16,6 +16,7 @@ Other features * :doc:`Custom document model ` is now documented (Emily Horsman) * Use minified versions of CSS in the admin by adding minification to the front-end tooling (Vincent Audebert, Thibaud Colas) + * Wagtailforms serve view now passes ``request.FILES``, for use in custom form handlers (LB (Ben Johnston)) Bug fixes diff --git a/wagtail/wagtailforms/models.py b/wagtail/wagtailforms/models.py index a22920bc3..9165b131e 100644 --- a/wagtail/wagtailforms/models.py +++ b/wagtail/wagtailforms/models.py @@ -237,7 +237,7 @@ class AbstractForm(Page): def serve(self, request, *args, **kwargs): if request.method == 'POST': - form = self.get_form(request.POST, page=self, user=request.user) + form = self.get_form(request.POST, request.FILES, page=self, user=request.user) if form.is_valid(): self.process_form_submission(form)