diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 1e477ed04..4a6580a7a 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -259,11 +259,12 @@ class Attachment < ActiveRecord::Base end def office_conver + return unless %w(Project Course).included? (self.container_type) saved_path = File.join(Rails.root, "files", "convered_office") unless Dir.exist?(saved_path) Dir.mkdir(saved_path) end - convered_file = File.join(saved_path, self.disk_filename + ".html") + convered_file = File.join(saved_path, self.disk_filename + ".pdf") OfficeConverTask.new.conver(self.diskfile, convered_file) end