@@ -102,7 +102,7 class Attachment < ActiveRecord::Base | |||||
102 | if @temp_file && (@temp_file.size > 0) |
|
102 | if @temp_file && (@temp_file.size > 0) | |
103 | self.disk_directory = target_directory |
|
103 | self.disk_directory = target_directory | |
104 | self.disk_filename = Attachment.disk_filename(filename, disk_directory) |
|
104 | self.disk_filename = Attachment.disk_filename(filename, disk_directory) | |
105 | logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)") |
|
105 | logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)") if logger | |
106 | path = File.dirname(diskfile) |
|
106 | path = File.dirname(diskfile) | |
107 | unless File.directory?(path) |
|
107 | unless File.directory?(path) | |
108 | FileUtils.mkdir_p(path) |
|
108 | FileUtils.mkdir_p(path) |
General Comments 0
You need to be logged in to leave comments.
Login now