X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fattachment.html;h=5827e3d20d05cca04c35550650890c2bc34e2343;hb=e41880cfb8d9835bca858ec13c96724b08fa0af7;hp=5fc053967f9e3d3d4b06c697f4941bbd6a8cd0c0;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/view/attachment.html b/httemplate/view/attachment.html index 5fc053967..5827e3d20 100644 --- a/httemplate/view/attachment.html +++ b/httemplate/view/attachment.html @@ -1,4 +1,3 @@ -<% $attach->body %> <%init> my ($query) = $cgi->keywords; $query =~ /^(\d+)$/; @@ -8,9 +7,9 @@ $FS::CurrentUser::CurrentUser->access_right('Download attachment') or die 'acces my $attach = qsearchs('cust_attachment', { attachnum => $attachnum }) or die "Attachment not found: $attachnum"; die 'access denied' if $attach->disabled; +$r->subprocess_env('no-gzip' => 1); # disable mod_deflate $m->clear_buffer; $r->content_type($attach->mime_type || 'text/plain'); $r->headers_out->add('Content-Disposition' => 'attachment;filename=' . $attach->filename); - - +$m->print($attach->body);