Project

General

Profile

Feature #35683 » 0001-retrieve-filenames-of-thumbnails-when-rendering-a-PD.patch

Jens Krämer, 2021-08-04 12:50

View differences:

lib/redmine/export/pdf.rb
atta = RDMPdfEncoding.attach(@attachments, attrname, "UTF-8")
if atta
return atta.diskfile
elsif %r{/attachments/thumbnail/(?<id>[^/]+)/(?<size>\d+)} =~ attrname and
atta = @attachments.find{|a| a.id.to_s == id} and
atta.readable? and atta.visible?
return atta.thumbnail(size: size)
else
return nil
end
(1-1/3)