1
0
mirror of https://github.com/django/django.git synced 2025-02-08 16:35:17 +00:00
Michael Schwarz 72d541b61c Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments.
The fallback logic which allows non-UTF-8 encoded files to be passed to
attach_file() even when a `text/*` mime type has been specified is
moved to attach(). Both functions now fall back to a content type of
`application/octet-stream`.

A side effect is that a file's content is decoded in memory instead of
opening it in text mode and reading it into a string.

Some mimetype-related logic in _create_attachment() has become
obsolete as the code moved from attach_file() to attach() already
handles this.
2016-08-12 16:35:09 -04:00
..
2016-08-09 18:46:28 +02:00
2016-07-06 15:31:12 -04:00
2015-10-03 19:31:45 -04:00
2015-11-04 17:48:49 +01:00
2016-08-09 18:46:28 +02:00
2016-05-02 18:16:36 -04:00
2016-06-04 19:24:51 -04:00
2016-08-12 07:29:29 -04:00
2016-08-01 14:57:10 -04:00