mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (log): additional logs
This commit is contained in:
parent
bddc77960f
commit
fe324601d1
1 changed files with 4 additions and 0 deletions
|
|
@ -484,6 +484,7 @@ func FileSave(ctx *App, res http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
size, err := strconv.ParseUint(req.Header.Get("Upload-Length"), 10, 0)
|
size, err := strconv.ParseUint(req.Header.Get("Upload-Length"), 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Log.Debug("files::save::tus action=backend_save step=header_check_post err=%s", err.Error())
|
||||||
SendErrorResult(res, ErrNotValid)
|
SendErrorResult(res, ErrNotValid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -497,6 +498,7 @@ func FileSave(ctx *App, res http.ResponseWriter, req *http.Request) {
|
||||||
if proto == "tus" && req.Method == http.MethodHead {
|
if proto == "tus" && req.Method == http.MethodHead {
|
||||||
c := chunkedUploadCache.Get(cacheKey)
|
c := chunkedUploadCache.Get(cacheKey)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
Log.Debug("files::save::tus action=backend_save step=cache_fetch_head")
|
||||||
SendErrorResult(res, ErrNotFound)
|
SendErrorResult(res, ErrNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -509,11 +511,13 @@ func FileSave(ctx *App, res http.ResponseWriter, req *http.Request) {
|
||||||
if proto == "tus" && req.Method == http.MethodPatch {
|
if proto == "tus" && req.Method == http.MethodPatch {
|
||||||
requestOffset, err := strconv.ParseUint(req.Header.Get("Upload-Offset"), 10, 0)
|
requestOffset, err := strconv.ParseUint(req.Header.Get("Upload-Offset"), 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Log.Debug("files::save::tus action=backend_save step=header_check_patch err=%s", err.Error())
|
||||||
SendErrorResult(res, ErrNotValid)
|
SendErrorResult(res, ErrNotValid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c := chunkedUploadCache.Get(cacheKey)
|
c := chunkedUploadCache.Get(cacheKey)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
Log.Debug("files::save::tus action=backend_save step=cache_fetch_patch")
|
||||||
SendErrorResult(res, ErrNotFound)
|
SendErrorResult(res, ErrNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue