diff options
Diffstat (limited to 'system/admin/upload/upload.go')
-rw-r--r-- | system/admin/upload/upload.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/admin/upload/upload.go b/system/admin/upload/upload.go index 169bffe..dc6d8cc 100644 --- a/system/admin/upload/upload.go +++ b/system/admin/upload/upload.go @@ -45,7 +45,7 @@ func StoreFiles(req *http.Request) (map[string]string, error) { urlPathPrefix := "api" uploadDirName := "uploads" - uploadDir := filepath.Join(pwd, uploadDirName, fmt.Sprintf("%d", tm.Year()), fmt.Sprintf("%d", tm.Month())) + uploadDir := filepath.Join(pwd, uploadDirName, fmt.Sprintf("%d", tm.Year()), fmt.Sprintf("%02d", tm.Month())) err = os.MkdirAll(uploadDir, os.ModeDir|os.ModePerm) // loop over all files and save them to disk |