##// END OF EJS Templates
Log an error when trying to send an attachment that cannot be read....
Jean-Philippe Lang -
r10854:c87f36d20b26
parent child
Show More
@@ -128,7 +128,12 private
128
128
129 # Checks that the file exists and is readable
129 # Checks that the file exists and is readable
130 def file_readable
130 def file_readable
131 @attachment.readable? ? true : render_404
131 if @attachment.readable?
132 true
133 else
134 logger.error "Cannot send attachment, #{@attachment.diskfile} does not exist or is unreadable."
135 render_404
136 end
132 end
137 end
133
138
134 def read_authorize
139 def read_authorize
General Comments 0
You need to be logged in to leave comments. Login now