From cb5e82f71478a4fead100d487ff53b1d3c7b63c0 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Wed, 2 Nov 2016 01:21:47 -0700 Subject: adding proper padding on month int to dir name for file upload --- system/admin/upload/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/admin/upload/upload.go b/system/admin/upload/upload.go index dc6d8cc..323f371 100644 --- a/system/admin/upload/upload.go +++ b/system/admin/upload/upload.go @@ -81,7 +81,7 @@ func StoreFiles(req *http.Request) (map[string]string, error) { } // add name:urlPath to req.PostForm to be inserted into db - urlPath := fmt.Sprintf("/%s/%s/%d/%d/%s", urlPathPrefix, uploadDirName, tm.Year(), tm.Month(), filename) + urlPath := fmt.Sprintf("/%s/%s/%d/%02d/%s", urlPathPrefix, uploadDirName, tm.Year(), tm.Month(), filename) urlPaths[name] = urlPath } -- cgit v1.2.3