1
0
Fork 0
forked from forgejo/forgejo

Add LFS object verification step after upload (#2868)

* Add LFS object verification step after upload

* Fix file verification condition and small refactor

* Fix URLs

* Remove newline and return status 422 on failed verification

* Better error hadling
This commit is contained in:
Lauris BH 2017-11-08 15:04:19 +02:00 committed by GitHub
parent 61f5c22503
commit ba2e0240c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 2 deletions

View file

@ -681,6 +681,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/objects/:oid/:filename", lfs.ObjectOidHandler)
m.Any("/objects/:oid", lfs.ObjectOidHandler)
m.Post("/objects", lfs.PostHandler)
m.Post("/verify", lfs.VerifyHandler)
m.Any("/*", func(ctx *context.Context) {
ctx.Handle(404, "", nil)
})