mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -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}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user