0001-include-filename-only-for-attached-inline-images-128.patch
corbo/models.py | ||
---|---|---|
1 |
import os |
|
1 | 2 |
from datetime import datetime |
2 | 3 |
import logging |
3 | 4 |
import urlparse |
... | ... | |
85 | 86 |
storage = DefaultStorage() |
86 | 87 |
for img in html_tree.xpath('//img/@src'): |
87 | 88 |
img_path = img.lstrip(storage.base_url) |
88 |
m.attach(filename=img, data=storage.open(img_path)) |
|
89 |
m.attachments[img].is_inline = True |
|
89 |
img_name = os.path.basename(img_path) |
|
90 |
m.attach(filename=img_name, data=storage.open(img_path)) |
|
91 |
m.attachments[img_name].is_inline = True |
|
90 | 92 |
for s in subscriptions: |
91 | 93 |
if not s.identifier: |
92 | 94 |
continue |
93 |
- |