Merge branch 'pre-get-hook' of github.com:benitogf/tusd into pre-get-hook
This commit is contained in:
commit
c293c54417
|
@ -751,6 +751,13 @@ func (handler *UnroutedHandler) GetFile(w http.ResponseWriter, r *http.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if handler.config.PreGetCallback != nil {
|
||||||
|
if err := handler.config.PreGetCallback(newHookEvent(info, r)); err != nil {
|
||||||
|
handler.sendError(w, r, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set headers before sending responses
|
// Set headers before sending responses
|
||||||
w.Header().Set("Content-Length", strconv.FormatInt(info.Offset, 10))
|
w.Header().Set("Content-Length", strconv.FormatInt(info.Offset, 10))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue