Fossil SCM

attachment_list(), used by wiki, tech-note, and ticket attachment lists, now includes a download link which attempts to download using the file's name instead of artifact ID. Discussed in [forum:6566f665a3685c4f | forum post 6566f665a3685c4f].

stephan 2021-08-18 19:13 trunk
Commit 648bb4c1b58364e65ab229051956eae651a395b97818295c60954e9c339f9a83
1 file changed +1
--- src/attach.c
+++ src/attach.c
@@ -659,10 +659,11 @@
659659
@ %s(zHeader)
660660
}
661661
cnt++;
662662
@ <li>
663663
@ %z(href("%R/artifact/%!S",zSrc))%h(zFile)</a>
664
+ @ [<a href="%R/attachdownload/%t(zFile)?page=%t(zTarget)&file=%t(zFile)">download</a>]
664665
@ added by %h(zDispUser) on
665666
hyperlink_to_date(zDate, ".");
666667
@ [%z(href("%R/ainfo/%!S",zUuid))details</a>]
667668
@ </li>
668669
}
669670
--- src/attach.c
+++ src/attach.c
@@ -659,10 +659,11 @@
659 @ %s(zHeader)
660 }
661 cnt++;
662 @ <li>
663 @ %z(href("%R/artifact/%!S",zSrc))%h(zFile)</a>
 
664 @ added by %h(zDispUser) on
665 hyperlink_to_date(zDate, ".");
666 @ [%z(href("%R/ainfo/%!S",zUuid))details</a>]
667 @ </li>
668 }
669
--- src/attach.c
+++ src/attach.c
@@ -659,10 +659,11 @@
659 @ %s(zHeader)
660 }
661 cnt++;
662 @ <li>
663 @ %z(href("%R/artifact/%!S",zSrc))%h(zFile)</a>
664 @ [<a href="%R/attachdownload/%t(zFile)?page=%t(zTarget)&file=%t(zFile)">download</a>]
665 @ added by %h(zDispUser) on
666 hyperlink_to_date(zDate, ".");
667 @ [%z(href("%R/ainfo/%!S",zUuid))details</a>]
668 @ </li>
669 }
670

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button