Hook Request #1355
This commit is contained in:
parent
8137d71ba4
commit
b3fc36cf3f
@ -64,9 +64,8 @@ class DmsfFilesController < ApplicationController
|
|||||||
access.action = DmsfFileRevisionAccess::DownloadAction
|
access.action = DmsfFileRevisionAccess::DownloadAction
|
||||||
access.save!
|
access.save!
|
||||||
# Allow a preview of the file by an external plugin
|
# Allow a preview of the file by an external plugin
|
||||||
result = { processed: false }
|
results = call_hook(:dmsf_files_controller_before_view, { file: @revision.disk_file })
|
||||||
call_hook(:dmsf_files_controller_before_view, { file: @revision.disk_file, result: result })
|
return if results.first == true
|
||||||
return if result[:processed]
|
|
||||||
member = Member.find_by(user_id: User.current.id, project_id: @file.project.id)
|
member = Member.find_by(user_id: User.current.id, project_id: @file.project.id)
|
||||||
# IE has got a tendency to cache files
|
# IE has got a tendency to cache files
|
||||||
expires_in 0.year, 'must-revalidate' => true
|
expires_in 0.year, 'must-revalidate' => true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user