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:38:25 -0400 |
| commit | 8abe2d0643a9ad9986e5b12644dbe0d0fc8b5f5d (patch) | |
| tree | 3a0b1df6c9e9cc7470e4fd4f4d5dba32415e26f1 /docs/ref/forms/fields.txt | |
| parent | 8050e6282e4daee24758a4a1c6c2fa938957bef2 (diff) | |
[1.8.x] Fixed #24948 -- Fixed crash when uploading bitmap images in forms.ImageField
Backport of cf6ce279c7671a4c83c960c5c526f92679a4fac8 from master
Diffstat (limited to 'docs/ref/forms/fields.txt')
| -rw-r--r-- | docs/ref/forms/fields.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index c8317924d9..55a8bc049e 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -690,13 +690,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 |
