fix stupid
This commit is contained in:
parent
68093dc543
commit
f2580bb8ff
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ func handleUpload(w http.ResponseWriter, r *http.Request) {
|
|||
// MaxBytesReader closes the underlying io.Reader on its Close() is called
|
||||
defer src.Close()
|
||||
|
||||
err = os.MkdirAll(filepath.Base(path), 0775)
|
||||
err = os.MkdirAll(filepath.Dir(path), 0775)
|
||||
if err != nil {
|
||||
slog.ErrorContext(r.Context(), "Creating Folder", "err", err)
|
||||
http.Error(w, "Creating Folder: "+err.Error(), http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Reference in a new issue