From aaa946f0d806cfb941a1fcb89ccf4d818b7d709f Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 17 Feb 2013 00:33:49 -0500 Subject: [PATCH] file path fix --- app/models/upload.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/upload.rb b/app/models/upload.rb index fe8091133..d4f9417d6 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -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