Change wopi_controller using Paperclip for reading

This commit is contained in:
Jure Grabnar 2019-09-19 15:03:13 +02:00
parent 29ffe05442
commit cc561d8ee5

View file

@ -12,7 +12,7 @@ class WopiController < ActionController::Base
def file_contents_get_endpoint
# get_file
response.headers['X-WOPI-ItemVersion'] = @asset.version
response.body = Paperclip.io_adapters.for(@asset.file).read
response.body = @asset.file.download
send_data response.body, disposition: 'inline', content_type: 'text/plain'
end