summaryrefslogtreecommitdiff
path: root/system/admin/upload/upload.go
diff options
context:
space:
mode:
authorMiguel Angel Ajo <majopela@redhat.com>2019-12-30 00:52:57 +0100
committerMiguel Angel Ajo <majopela@redhat.com>2019-12-30 00:52:57 +0100
commit6ee81caea4649d3fc3bb6b5bde0628cb91c8e6f5 (patch)
tree138e6b7d6f8bd5c879eff61ce85df95506546003 /system/admin/upload/upload.go
parent2469ec062724f39d594f84d1c62362da01b9a644 (diff)
Fix missing imports
Diffstat (limited to 'system/admin/upload/upload.go')
-rw-r--r--system/admin/upload/upload.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/admin/upload/upload.go b/system/admin/upload/upload.go
index e19c3af..a5a2d1c 100644
--- a/system/admin/upload/upload.go
+++ b/system/admin/upload/upload.go
@@ -14,6 +14,8 @@ import (
"strconv"
"time"
+ "github.com/ponzu-cms/ponzu/system/cfg"
+
"github.com/ponzu-cms/ponzu/system/db"
"github.com/ponzu-cms/ponzu/system/item"
)
@@ -41,7 +43,6 @@ func StoreFiles(req *http.Request) (map[string]string, error) {
req.Form.Set("timestamp", ts)
// get or create upload directory to save files from request
-
i, err := strconv.ParseInt(ts, 10, 64)
if err != nil {
return nil, err
@@ -51,7 +52,6 @@ func StoreFiles(req *http.Request) (map[string]string, error) {
urlPathPrefix := "api"
uploadDirName := "uploads"
-
uploadDir := filepath.Join(cfg.UploadDir(), fmt.Sprintf("%d", tm.Year()), fmt.Sprintf("%02d", tm.Month()))
err = os.MkdirAll(uploadDir, os.ModeDir|os.ModePerm)
if err != nil {