X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/afeee2923ff8340e4d9b8027a0d32b26bfcef17f..6403cb9b08dfb7b0411c88515da34f27a813dd4a:/config/initializers/streaming.rb diff --git a/config/initializers/streaming.rb b/config/initializers/streaming.rb index db61e6b24..3db2a55f9 100644 --- a/config/initializers/streaming.rb +++ b/config/initializers/streaming.rb @@ -4,7 +4,7 @@ module ActionController alias_method :old_send_file, :send_file def send_file(file, options = {}) - if file.is_a? File or file.is_a? Tempfile + if file.is_a?(File) || file.is_a?(Tempfile) headers["Content-Length"] ||= file.size.to_s options[:filename] ||= File.basename(file.path) unless options[:url_based_filename]