Skip to content

Commit 98b7714

Browse files
yardenshohamZettat123wolfogre
authored
Fix 404 error viewing the LFS file (#22945) (#22948)
Backport #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: Zettat123 <zettat123@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com>
1 parent 9da4642 commit 98b7714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/settings/lfs_file.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<strong>{{.locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
3636
</audio>
3737
{{else if .IsPDFFile}}
38-
<iframe width="100%" height="600px" src="{{AppSubUrl}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
38+
<iframe width="100%" height="600px" src="{{AssetUrlPrefix}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
3939
{{else}}
4040
<a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.locale.Tr "repo.file_view_raw"}}</a>
4141
{{end}}

0 commit comments

Comments
 (0)