We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc892a8 commit 0f135a3Copy full SHA for 0f135a3
models/repo/attachment.go
@@ -58,11 +58,11 @@ func (a *Attachment) RelativePath() string {
58
59
// DownloadURL returns the download url of the attached file
60
func (a *Attachment) DownloadURL() string {
61
- if a.CustomDownloadURL == "" {
62
- return setting.AppURL + "attachments/" + url.PathEscape(a.UUID)
63
- } else {
+ if a.CustomDownloadURL != "" {
64
return a.CustomDownloadURL
65
}
+
+ return setting.AppURL + "attachments/" + url.PathEscape(a.UUID)
66
67
68
// _____ __ __ .__ __
0 commit comments