소스 검색

Merged r19365 from trunk to 4.0-stable (#20277).


git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@19367 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.0.6
Go MAEDA 4 년 전
부모
커밋
0ce51ecade
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      app/controllers/attachments_controller.rb

+ 2
- 2
app/controllers/attachments_controller.rb 파일 보기

@@ -68,7 +68,7 @@ class AttachmentsController < ApplicationController
@attachment.increment_download
end

if stale?(:etag => @attachment.digest)
if stale?(:etag => @attachment.digest, :template => false)
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
@@ -78,7 +78,7 @@ class AttachmentsController < ApplicationController

def thumbnail
if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size])
if stale?(:etag => tbnail)
if stale?(:etag => tbnail, :template => false)
send_file tbnail,
:filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),

Loading…
취소
저장