Opened 18 years ago
Closed 18 years ago
#4676 closed defect (fixed)
Pdf files don't trigger "binary content" download message
Reported by: | Tim Hatch | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | version control/browser | Version: | devel |
Severity: | normal | Keywords: | mimeview |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The main mimeview renderer loop doesn't check to see if there are actually any acceptable renderers.
class PlainTextRenderer(Component): ... TREAT_AS_BINARY = [ 'application/pdf', 'application/postscript', 'application/rtf' ]
These make PlainTextRenderer return 0 for quality, so it's not used. PDF files under max_preview_size don't get the "download the file instead" link, and I wonder if we should add a new flag (checked in templates/macros.html, preview_file) for whether there is no preview because it was unclaimed binary data.
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
Keywords: | mimeview added |
---|---|
Milestone: | → 0.11 |
Version: | → devel |
comment:2 by , 18 years ago
Ok, the:
Download in other formats:
Original Format
link is there… but now I guess you were talking of no explicit message appearing in the area where the preview should be. A reason like since no preview renderer could handle it instead of since the file size exceeds 262144 bytes. should be adequate, I think.
comment:3 by , 18 years ago
Yeah, that's it. There's an inconsistency between a .bin file of say 96k vs a .pdf file of 96k. I'd think they would both offer there "no preview; download instead" box. I like your "no preview available" as opposed to "is binary" now that I think about it.
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r4708, feel free to tweak the message if you want (<insert the usual I'm not a native speaker disclaimer here> ;-) ).
Well, the download original content should always show up, no?
(I'm not saying it currently is, but that it really should).