making umask write out files so that the web server can read them
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@137 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
2a9ce62c8a
commit
af2050cede
|
@ -66,6 +66,7 @@ class Image < ActiveRecord::Base
|
|||
# files if applicable.
|
||||
#
|
||||
def setup_directories
|
||||
File.umask(0022)
|
||||
Dir.mkdir(base_directory) unless File.exist?(base_directory)
|
||||
self.original = File.basename(@file.original_filename).gsub(/[^\w._-]/, '')
|
||||
@magick_image.write("#{base_directory}/#{self.original}")
|
||||
|
|
Reference in New Issue