Redirect to raw format for PDF attachments
Makes links to PDF attachments go directly to the raw file rather than the preview page (which doesn't actually preview the file).
To delete attachments, you'll need to enter an explicit URL: /attachment/realm/id/filename.pdf?action=delete.
If you have any issues, create a new ticket.
Download the zipped source from here.
Installation directly from SVN (for more info see t:TracPlugins):
If you want the PDF to render in the browser, you'll need to make the following configuration changes:
[attachments] render_unsafe_content = true [browser] render_unsafe_content = true
Upload a PDF and click on it. You'll be able to download it immediately instead of having to click through the preview page.
Fixes #8066: Tagged version 0.3.
Refs #8066: Bumped version to 0.3. Added tags directory.
Fixes #8583: version 0.2
- Allow attachment to be deleted if action is delete. To delete an attachment, enter the following URL: /attachment/realm/filename.pdf?action=delete. Thanks to hasienda for the patch.
- Formatting and style changes to source code.
Developed at The Open Planning Project.