parent
61a57b8fdf
commit
2ad5095843
@ -2193,20 +2193,15 @@ class BasePage: # pylint: disable=C1001
|
|||||||
mime_type = media.get_mime_type()
|
mime_type = media.get_mime_type()
|
||||||
if mime_type:
|
if mime_type:
|
||||||
if mime_type.startswith("image/"):
|
if mime_type.startswith("image/"):
|
||||||
real_path, newpath = \
|
real_path, new_path = \
|
||||||
self.report.prepare_copy_media(
|
self.report.prepare_copy_media(
|
||||||
media)
|
media)
|
||||||
newpath = self.report.build_url_fname(
|
newpath = self.report.build_url_fname(
|
||||||
newpath, uplink=self.uplink)
|
new_path, uplink=self.uplink)
|
||||||
dest_dir = os.path.dirname(
|
|
||||||
self.report.cur_fname)
|
|
||||||
if dest_dir:
|
|
||||||
newpath = os.path.join(dest_dir,
|
|
||||||
newpath)
|
|
||||||
self.report.copy_file(
|
self.report.copy_file(
|
||||||
media_path_full(self.r_db,
|
media_path_full(self.r_db,
|
||||||
media.get_path()),
|
media.get_path()),
|
||||||
newpath)
|
new_path)
|
||||||
|
|
||||||
tmp += Html("li",
|
tmp += Html("li",
|
||||||
self.media_link(
|
self.media_link(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user