加上utf8头

This commit is contained in:
guange 2015-06-03 17:52:59 +08:00
parent 9ecb119aa4
commit e4d68e988e
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -1,3 +1,5 @@
#coding=utf-8
namespace :office do
desc "conver any files to html"
task :conver => :environment do

View File

@ -1,3 +1,5 @@
#coding=utf-8
module Trustie
module Utils
class Office