#944 closed defect (duplicate)
Add support for simpler references to attachments in Wiki pages and Ticket wiki
Reported by: | Christian Boos | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Currently, it is possible to refer to attachments, using explicit links, like this:
http://projects.edgewall.com/trac/attachment/wiki/<the_wiki_page>/<the_attachment>
http://projects.edgewall.com/trac/attachment/ticket/<the_ticket>/<the_attachment>
Adding ?format=raw
to the end of the above even allows images to be displayed inline.
IMHO, it is important to present a simpler syntax for the average wiki user.
I propose the following syntax:
img:<the_attachment>
to get the attached image displayed inlineattachment:<the_attachment>
to get a link to the attachment
(I set the priority to high because I think that this should go in 0.8: it would be bad to advertise having attachments without a feature like this one)
Attachments (1)
Change History (8)
by , 20 years ago
Attachment: | attachment.1073.diff added |
---|
comment:1 by , 20 years ago
I personally think this comes a bit late for 0.8… but I'll let jonas or daniel decide.
From some point of view every missing feature or bug is critical.
comment:2 by , 20 years ago
Milestone: | 0.8 |
---|---|
Priority: | high → normal |
I just thought this would be the logical companion to the attachments feature, but later I realized that the attachments were already a 0.7 feature. So it's not that important if this ticket is resolved for 0.8 or later.
(Actually I don't really care for what goes in 0.8: I always use the bleeding edge trac anyway!)
comment:3 by , 20 years ago
Actually, one should be able to refer to any attachments, even non local ones.
Therefore the proposed syntax should be extended. Some ideas:
- #691:attachment:Wiki.patch
- #691/Wiki.patch
- ticket:691:attachment:Wiki.patch
- ticket:691/Wiki.patch
- #875:img:ff_1010.png
- #875/img:ff_1010.png
- ticket:875:img:ff_1010.png
- ticket:875/img:ff_1010.png
To me, the usage of '/' seems the best,
because it separates clearly the part linking
to the reference and the part linking to the
attachment, while preserving flexibility
(the img
(=inline) vs. attachment
(=url) distinction, with a default to attachment
).
But then, it is still unclear for me if '/' can be part of a WikiName (#733): HeresTheCurrentBehavior/SlashInWikiName?
Any comments?
comment:4 by , 20 years ago
Ok, I checked WikiPageNames: '/' can be part of a Wiki page name.
A reference to an attachment of a Wiki could nevertheless use the following syntax:
- SandBox/img:02a.JPG
- SandBox/attachment:02a.JPG
as SandBox/img:
and SandBox/attachment:
can't possibly be part of a valid Wiki page name.
comment:6 by , 18 years ago
comment:7 by , 9 years ago
Reporter: | changed from | to
---|
Proposed implementation of the feature