Prevent Browsers from caching downloaded documents
This commit is contained in:
parent
97114d4a28
commit
77a6462e5b
@ -88,6 +88,8 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
|
||||
def download_email_entries
|
||||
# IE has got a tendency to cache files
|
||||
expires_in(0.year, "must-revalidate" => true)
|
||||
send_file(
|
||||
params[:path],
|
||||
:filename => 'Documents.zip',
|
||||
|
||||
@ -65,6 +65,8 @@ class DmsfFilesController < ApplicationController
|
||||
else
|
||||
title_format = Setting.plugin_redmine_dmsf['dmsf_global_title_format']
|
||||
end
|
||||
# IE has got a tendency to cache files
|
||||
expires_in(0.year, "must-revalidate" => true)
|
||||
send_file(@revision.disk_file,
|
||||
:filename => filename_for_content_disposition(@revision.formatted_name(title_format)),
|
||||
:type => @revision.detect_content_type,
|
||||
|
||||
@ -30,6 +30,8 @@ class DmsfPublicUrlsController < ApplicationController
|
||||
if dmsf_public_url
|
||||
revision = dmsf_public_url.dmsf_file.last_revision
|
||||
begin
|
||||
# IE has got a tendency to cache files
|
||||
expires_in(0.year, "must-revalidate" => true)
|
||||
send_file(revision.disk_file,
|
||||
:filename => filename_for_content_disposition(revision.name),
|
||||
:type => revision.detect_content_type,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user