You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/templates
qwerty287 df9612bb53
Add API to serve blob or LFS file content (#19689)
* Add LFS API

* Update routers/api/v1/repo/file.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Apply suggestions

* Apply suggestions

* Update routers/api/v1/repo/file.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Report errors

* ADd test

* Use own repo for test

* Use different repo name

* Improve handling

* Slight restructures

1. Avoid reading the blob data multiple times
2. Ensure that caching is only checked when about to serve the blob/lfs
3. Avoid nesting by returning early
4. Make log message a bit more clear
5. Ensure that the dataRc is closed by defer when passed to ServeData

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
admin Replace blue button and label classes with primary (#19763) 2 years ago
api/packages/pypi Add Package Registry (#16510) 2 years ago
base Add the possibility to allow the user to have a favicon which differs from the main logo (#18542) 2 years ago
custom Add footer extra links template (#9576) 5 years ago
explore Replace blue button and label classes with primary (#19763) 2 years ago
mail Try to prevent autolinking of displaynames by email readers (#19169) 2 years ago
org Replace blue button and label classes with primary (#19763) 2 years ago
package Replace blue button and label classes with primary (#19763) 2 years ago
repo Disable unnecessary mirroring elements (#18527) 2 years ago
shared Show source/target branches on PR's list (#19747) 2 years ago
status Refactor HTTP request context (#17979) 3 years ago
swagger Add API to serve blob or LFS file content (#19689) 2 years ago
user Disable unnecessary mirroring elements (#18527) 2 years ago
home.tmpl Rename StaticUrlPrefix to AssetUrlPrefix (#15779) 3 years ago
install.tmpl Refactor install page (db type) (#17919) 3 years ago
post-install.tmpl Rename StaticUrlPrefix to AssetUrlPrefix (#15779) 3 years ago