mirror of
https://github.com/redmine/redmine.git
synced 2026-07-07 14:51:49 +02:00
Retrieve filenames of thumbnails when rendering a PDF (#35683).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@21212 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -104,6 +104,10 @@ module Redmine
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user