diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 9c3b624af..d3781d747 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -73,7 +73,7 @@ class AttachmentsController < ApplicationController if candown || User.current.admin? || User.current.id == @attachment.author_id @attachment.increment_download if stale?(:etag => @attachment.digest) - convered_file = @attachment.disk_filename + convered_file = @attachment.diskfile unless pdf?(convered_file) convered_file = File.join(Rails.root, "files", "convered_office", @attachment.disk_filename + ".pdf") end diff --git a/lib/tasks/office.rake b/lib/tasks/office.rake index ce2d3a221..c6ee8b4dd 100644 --- a/lib/tasks/office.rake +++ b/lib/tasks/office.rake @@ -1,3 +1,5 @@ +#coding=utf-8 + namespace :office do desc "conver any files to html" task :conver => :environment do diff --git a/lib/trustie/utils/office.rb b/lib/trustie/utils/office.rb index adfa3fb5c..61d6b9d4c 100644 --- a/lib/trustie/utils/office.rb +++ b/lib/trustie/utils/office.rb @@ -1,3 +1,5 @@ +#coding=utf-8 + module Trustie module Utils class Office