diff options
-rwxr-xr-x | attachment.cgi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/attachment.cgi b/attachment.cgi index 7df230d79..e7fadf66f 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -346,7 +346,8 @@ sub view { local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 10000; $filename = encode('MIME-Q', $filename); - my $disposition = Bugzilla->params->{'allow_attachment_display'} ? 'inline' : 'attachment'; + my $disposition = (Bugzilla->params->{'allow_attachment_display'} + && $attachment->is_viewable) ? 'inline' : 'attachment'; # Don't send a charset header with attachments--they might not be UTF-8. # However, we do allow people to explicitly specify a charset if they |