summaryrefslogtreecommitdiff
path: root/system/db/upload.go
diff options
context:
space:
mode:
authorNick Randall <nicksrandall@gmail.com>2018-01-03 16:47:36 -0500
committerSteve Manuel <nilslice@gmail.com>2018-01-03 14:47:36 -0700
commit62e38de4b127d75093afb646227ff42575228f3d (patch)
tree4eb1e31262907a029863a13e6fe93d89a0d0b1a8 /system/db/upload.go
parent7a64412d2bddd9f65215da0faab5b27a2b614ecb (diff)
Fix UUID issues (#216)
* fixing errors due to new updates to uuid packakge * fix fomatting * updating vendored version of uuid package
Diffstat (limited to 'system/db/upload.go')
-rw-r--r--system/db/upload.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/db/upload.go b/system/db/upload.go
index beeee2d..b7171dd 100644
--- a/system/db/upload.go
+++ b/system/db/upload.go
@@ -28,8 +28,13 @@ func SetUpload(target string, data url.Values) (int, error) {
if data.Get("uuid") == "" ||
data.Get("uuid") == (uuid.UUID{}).String() {
+
// set new UUID for upload
- data.Set("uuid", uuid.NewV4().String())
+ uid, err := uuid.NewV4()
+ if err != nil {
+ return 0, err
+ }
+ data.Set("uuid", uid.String())
}
if data.Get("slug") == "" {