diff options
| author | Andriy Sokolovskiy <me@asokolovskiy.com> | 2015-06-16 18:24:59 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-16 14:37:58 -0400 |
| commit | cf6ce279c7671a4c83c960c5c526f92679a4fac8 (patch) | |
| tree | ed3a8e83efe38ad7a7969caba5376e2d6567007c /docs | |
| parent | fbc618c13cc72b9c2f4c8dfd5ef8b8ab5a5d7caa (diff) | |
Fixed #24948 -- Fixed crash when uploading bitmap images in forms.ImageField
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/fields.txt | 13 | ||||
| -rw-r--r-- | docs/releases/1.8.3.txt | 3 |
2 files changed, 11 insertions, 5 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 8f8d29e6f9..305b57fbce 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -684,13 +684,16 @@ For each field, we describe the default widget used if you don't specify When you use an ``ImageField`` on a form, you must also remember to :ref:`bind the file data to the form <binding-uploaded-files>`. + After the field has been cleaned and validated, the ``UploadedFile`` + object will have an additional ``image`` attribute containing the Pillow + `Image`_ instance used to check if the file was a valid image. Also, + ``UploadedFile.content_type`` will be updated with the image's content type + if Pillow can determine it, otherwise it will be set to ``None``. + .. versionchanged:: 1.8 - After the field has been cleaned and validated, the ``UploadedFile`` - object will have an additional ``image`` attribute containing the Pillow - `Image`_ instance used to check if the file was a valid image. - ``UploadedFile.content_type`` is also updated with the image's content - type as determined by Pillow. + The ``image`` and ``content_type`` attributes described in the last + paragraph were added. .. _Pillow: http://pillow.readthedocs.org/en/latest/ .. _Image: https://pillow.readthedocs.org/en/latest/reference/Image.html diff --git a/docs/releases/1.8.3.txt b/docs/releases/1.8.3.txt index c6745f92c3..ee525c9275 100644 --- a/docs/releases/1.8.3.txt +++ b/docs/releases/1.8.3.txt @@ -71,3 +71,6 @@ Bugfixes using UUID primary keys (:ticket:`24912`). * Fixed removing ``unique_together`` constraints on MySQL (:ticket:`24972`). + +* Fixed crash when uploading images with MIME types that Pillow doesn't detect, + such as bitmap, in ``forms.ImageField`` (:ticket:`24948`). |
