diff options
author | Zettat123 <zettat123@gmail.com> | 2023-02-17 11:55:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 11:55:33 +0800 |
commit | 5a12e95d2a3bc3dcc017dfce0cb1b77b0736e6f4 (patch) | |
tree | e1ce0822ea3d1fdedfc4c649a4f4223c844c03e2 | |
parent | d9c6cb71e16145ac8f3d9f94f59d3b15ad873631 (diff) | |
download | gitea-5a12e95d2a3bc3dcc017dfce0cb1b77b0736e6f4.tar.gz gitea-5a12e95d2a3bc3dcc017dfce0cb1b77b0736e6f4.zip |
Fix 404 error viewing the LFS file (#22945)
Fix #22734.
According to
[`view_file.tmpl`](https://github.com/go-gitea/gitea/blob/main/templates/repo/view_file.tmpl#L82),
`lfs_file.tmpl` should use `AssetUrlPrefix` instead of `AppSubUrl`.
Co-authored-by: Jason Song <i@wolfogre.com>
-rw-r--r-- | templates/repo/settings/lfs_file.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl index eb67de20a0..54b40bd004 100644 --- a/templates/repo/settings/lfs_file.tmpl +++ b/templates/repo/settings/lfs_file.tmpl @@ -35,7 +35,7 @@ <strong>{{.locale.Tr "repo.audio_not_supported_in_browser"}}</strong> </audio> {{else if .IsPDFFile}} - <iframe width="100%" height="600px" src="{{AppSubUrl}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe> + <iframe width="100%" height="600px" src="{{AssetUrlPrefix}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe> {{else}} <a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.locale.Tr "repo.file_view_raw"}}</a> {{end}} |