diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 8fd46759..069e7372 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -68,6 +68,8 @@ module Linguist def disposition if text? || image? 'inline' + elsif name.nil? + "attachment" else "attachment; filename=#{EscapeUtils.escape_url(pathname.basename)}" end