Feature #35683 » 0001-retrieve-filenames-of-thumbnails-when-rendering-a-PD.patch
| 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
|
||