Skip to content

Commit

Permalink
new uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
StarmanMartin authored Sep 23, 2021
1 parent 1c22498 commit 22de752
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upload.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package router

import (
"github.com/google/uuid"
"github.com/starmanmartin/simple-router/request"
"io"
"io/ioutil"
"log"
Expand All @@ -10,8 +12,6 @@ import (
"path/filepath"
"strings"
"sync"
"github.com/wayn3h0/go-uuid"
"github.com/starmanmartin/simple-router/request"
)

var cleanUpSync sync.Once
Expand Down Expand Up @@ -67,7 +67,7 @@ func newUploadPaser(path string, isBuffer bool) HTTPHandler {
}

if len(p.Header["Content-Type"]) > 0 {
uuidS, _ := uuid.NewV1()
uuidS, _ := uuid.NewUUID()
filename := uuidS.String() + p.FileName()
err = ioutil.WriteFile(filepath.Join(path, filename), slurp, sourceinfo.Mode())
if err != nil {
Expand Down

0 comments on commit 22de752

Please sign in to comment.