You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/04 22:08:52 UTC
[GitHub] [superset] eschutho commented on a diff in pull request #19929: chore: change subject name from no_name to named for PNGs in
eschutho commented on code in PR #19929:
URL: https://github.com/apache/superset/pull/19929#discussion_r865425223
##########
superset/utils/core.py:
##########
@@ -928,9 +928,12 @@ def send_email_smtp( # pylint: disable=invalid-name,too-many-arguments,too-many
# Attach any inline images, which may be required for display in
# HTML content (inline)
for msgid, imgdata in (images or {}).items():
- image = MIMEImage(imgdata)
+ formatted_time = formatdate(localtime=True)
+ file_name = f"{subject} {formatted_time}"
+ image = MIMEImage(imgdata, name=file_name)
image.add_header("Content-ID", "<%s>" % msgid)
image.add_header("Content-Disposition", "inline")
+ image.add_header("Content-Disposition", 'attachment; filename="%s"' % file_name)
Review Comment:
what's the difference between this line, and what we're doing in line 937?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org