diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-02 01:21:47 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-02 01:21:47 -0700 |
commit | cb5e82f71478a4fead100d487ff53b1d3c7b63c0 (patch) | |
tree | f4777d52b28879e03e16be0213a3ddf3c90fe157 /system/admin/upload/upload.go | |
parent | 330c35078d1b12657a373473d1638612f6cbbb8e (diff) |
adding proper padding on month int to dir name for file upload
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 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 } |