mirror of
https://git.zx2c4.com/cgit
synced 2025-07-08 01:04:33 +02:00
Add support for downloading single blobs
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
7250a15467
commit
ca8eb8fc8f
5 changed files with 47 additions and 3 deletions
|
@ -40,6 +40,13 @@ void cgit_print_view(const char *hex, char *path)
|
|||
htmlf("%s %s, %li bytes", typename(type), hex, size);
|
||||
if (path)
|
||||
html(")");
|
||||
|
||||
html(" <a href='");
|
||||
html_attr(cgit_pageurl(cgit_query_repo, "blob",
|
||||
fmt("id=%s&path=%s",
|
||||
hex,
|
||||
path)));
|
||||
html("'>download</a>");
|
||||
html("</th></tr>\n");
|
||||
html("<tr><td class='blob'>\n");
|
||||
html_txt(buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue