1
0
mirror of https://github.com/django/django.git synced 2025-04-08 15:36:47 +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
..
2013-10-10 16:49:20 -04:00
2012-08-31 20:35:50 +02:00
2012-08-31 20:35:50 +02:00
2015-02-20 09:21:39 -05:00
2014-12-19 18:07:52 +01:00
2014-12-19 18:07:52 +01:00
2015-01-02 19:20:18 -05:00
2015-02-20 09:21:39 -05:00
2016-08-09 18:46:28 +02:00
2015-02-20 09:21:39 -05:00
2014-12-19 18:07:52 +01:00
2014-12-19 18:07:52 +01:00
2015-01-02 19:20:18 -05:00
2014-12-19 18:07:52 +01:00
2015-02-20 09:21:39 -05:00
2014-09-02 21:34:29 -04:00
2015-01-02 19:20:18 -05:00
2015-02-20 09:21:39 -05:00
2016-07-06 15:31:12 -04:00
2015-01-27 11:48:04 -05:00
2015-05-01 16:24:39 -04:00
2015-05-20 13:48:06 -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