mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-28 07:50:25 +01:00
[#1125] added support for partial/range file requests
This commit is contained in:
1 parent
328b99a690
commit
bd65125744
4 files changed
+70
-24
No files matched your search
+3
-1
@@ -94,7 +94,9 @@ func (api *fileApi) download(c echo.Context) error {
|
||||
}
|
||||
|
||||
return api.app.OnFileDownloadRequest().Trigger(event, func(e *core.FileDownloadEvent) error {
|
||||
if err := fs.Serve(e.HttpContext.Response(), e.ServedPath, e.ServedName); err != nil {
|
||||
res := e.HttpContext.Response()
|
||||
req := e.HttpContext.Request()
|
||||
if err := fs.Serve(res, req, e.ServedPath, e.ServedName); err != nil {
|
||||
return NewNotFoundError("", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user