Feature #35683 » 0001-retrieve-filenames-of-thumbnails-when-rendering-a-PD.patch
| lib/redmine/export/pdf.rb | ||
|---|---|---|
| 104 | 104 |
atta = RDMPdfEncoding.attach(@attachments, attrname, "UTF-8") |
| 105 | 105 |
if atta |
| 106 | 106 |
return atta.diskfile |
| 107 |
elsif %r{/attachments/thumbnail/(?<id>[^/]+)/(?<size>\d+)} =~ attrname and
|
|
| 108 |
atta = @attachments.find{|a| a.id.to_s == id} and
|
|
| 109 |
atta.readable? and atta.visible? |
|
| 110 |
return atta.thumbnail(size: size) |
|
| 107 | 111 |
else |
| 108 | 112 |
return nil |
| 109 | 113 |
end |