summaryrefslogtreecommitdiff
path: root/system/admin/upload/upload.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-13 13:13:07 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-13 13:13:07 -0800
commitffa8654af317bfb05b1d38a17aa4a972d1c8056d (patch)
tree3f434769aab44f1437f5438eae9942871f98950b /system/admin/upload/upload.go
parent59ee9fbb237673c2d0cccad42f7adbae65852b8d (diff)
adding more precise timestamp creation algorithm, and a LoadCacheConfig func to warm the config cache vs. trying to set defaults on init so the cache exists
Diffstat (limited to 'system/admin/upload/upload.go')
-rw-r--r--system/admin/upload/upload.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/admin/upload/upload.go b/system/admin/upload/upload.go
index 486f55c..6b99dfc 100644
--- a/system/admin/upload/upload.go
+++ b/system/admin/upload/upload.go
@@ -20,7 +20,7 @@ func StoreFiles(req *http.Request) (map[string]string, error) {
ts := req.FormValue("timestamp") // timestamp in milliseconds since unix epoch
if ts == "" {
- ts = fmt.Sprintf("%d", time.Now().Unix()*1000) // Unix() returns seconds since unix epoch
+ ts = fmt.Sprintf("%d", int64(time.Nanosecond)*time.Now().UnixNano()/int64(time.Millisecond)) // Unix() returns seconds since unix epoch
}
req.Form.Set("timestamp", ts)