From 5edee3e6bdb80d1c46633d68eddfd4cccd4d8235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B4=91=EC=98=A4?= Date: Sun, 30 Jul 2023 17:49:43 +0900 Subject: [PATCH] Revert "fix: Add directory creation code (#2575)" This reverts commit fe3060a952dc046ab07735733c3eb40df022d7cb. --- files/file.go | 1 - http/tus_handlers.go | 8 -------- 2 files changed, 9 deletions(-) diff --git a/files/file.go b/files/file.go index 051259a0..a077b062 100644 --- a/files/file.go +++ b/files/file.go @@ -24,7 +24,6 @@ import ( ) const PERM = 0664 -const DirPERM = 0755 // FileInfo describes a file. type FileInfo struct { diff --git a/http/tus_handlers.go b/http/tus_handlers.go index 1a621b8f..8df38d4b 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -6,7 +6,6 @@ import ( "io" "net/http" "os" - "path/filepath" "strconv" "github.com/spf13/afero" @@ -29,13 +28,6 @@ func tusPostHandler() handleFunc { if !d.user.Perm.Create || !d.Check(r.URL.Path) { return http.StatusForbidden, nil } - - dirPath := filepath.Dir(r.URL.Path) - if _, err := d.user.Fs.Stat(dirPath); os.IsNotExist(err) { - if err := d.user.Fs.MkdirAll(dirPath, files.DirPERM); err != nil { - return http.StatusInternalServerError, err - } - } case err != nil: return errToStatus(err), err }