file path fix

This commit is contained in:
albert
2013-02-17 00:33:49 -05:00
parent 0ad6fe1f29
commit aaa946f0d8

View File

@@ -271,6 +271,7 @@ class Upload < ActiveRecord::Base
out.write(file.read)
end
end
FileUtils.chmod(0664, file_path)
self.content_type = file.content_type || file_ext_to_content_type(file.original_filename)
self.file_ext = content_type_to_file_ext(content_type)
end