fix(http): run upload hooks for directories (#6034)

This commit is contained in:
tianrking authored and GitHub committed 2026-07-17 20:14:41 +02:00
1 parent fe7efb2e6a
commit 9b78324d77
2 files changed
+38 -1

No files matched your search

+3 -1
View File
@@ -130,7 +130,9 @@ func resourcePostHandler(fileCache FileCache) handleFunc {
// Directories creation on POST.
if strings.HasSuffix(r.URL.Path, "/") {
err := d.user.Fs.MkdirAll(r.URL.Path, d.settings.DirMode)
err := d.RunHook(func() error {
return d.user.Fs.MkdirAll(r.URL.Path, d.settings.DirMode)
}, "upload", r.URL.Path, "", d.user)
return errToStatus(err), err
}