mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Implement external assets
This commit is contained in:
parent
2e234300a2
commit
a61e7c7a39
22 changed files with 826 additions and 119 deletions
|
@ -122,6 +122,11 @@ func ServeAttachment(ctx *context.Context, uuid string) {
|
|||
}
|
||||
}
|
||||
|
||||
if attach.ExternalURL != "" {
|
||||
ctx.Redirect(attach.ExternalURL)
|
||||
return
|
||||
}
|
||||
|
||||
if err := attach.IncreaseDownloadCount(ctx); err != nil {
|
||||
ctx.ServerError("IncreaseDownloadCount", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue