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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]