Skip to content

Commit

Permalink
Fix to show image in Redmine
Browse files Browse the repository at this point in the history
See [this](jhovad#3)
  • Loading branch information
Hunter-Thompson authored and paurullan committed Jan 16, 2021
1 parent a70b996 commit 45587bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/amazon_s3/patches/attachments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def show
elsif @attachment.is_text? && @attachment.filesize <= Setting.file_max_size_displayed.to_i.kilobyte
@content = AmazonS3::Connection.get(@attachment.disk_filename_s3)
render :action => 'file'
elsif @attachment.is_image?
render :action => 'image'
else
download
end
Expand Down

0 comments on commit 45587bd

Please sign in to comment.