diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-02-09 21:56:32 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-02-09 21:56:32 -0800 |
| commit | 4ff4a147b258bb7787e492a74254f3993bb69d1a (patch) | |
| tree | 304dd8cba4ce415b7a9312f90760c8d086793b77 /weed/command/upload.go | |
| parent | 501bd72b1c9a88cadb5182cf9c13c2d796cf775f (diff) | |
| download | seaweedfs-4ff4a147b258bb7787e492a74254f3993bb69d1a.tar.xz seaweedfs-4ff4a147b258bb7787e492a74254f3993bb69d1a.zip | |
cleanup security.Secret
Diffstat (limited to 'weed/command/upload.go')
| -rw-r--r-- | weed/command/upload.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/weed/command/upload.go b/weed/command/upload.go index 244caaa4c..df2cb9892 100644 --- a/weed/command/upload.go +++ b/weed/command/upload.go @@ -7,7 +7,6 @@ import ( "path/filepath" "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/security" ) var ( @@ -23,7 +22,6 @@ type UploadOptions struct { dataCenter *string ttl *string maxMB *int - secretKey *string } func init() { @@ -37,7 +35,6 @@ func init() { upload.dataCenter = cmdUpload.Flag.String("dataCenter", "", "optional data center name") upload.ttl = cmdUpload.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y") upload.maxMB = cmdUpload.Flag.Int("maxMB", 0, "split files larger than the limit") - upload.secretKey = cmdUpload.Flag.String("secure.secret", "", "secret to encrypt Json Web Token(JWT)") } var cmdUpload = &Command{ @@ -60,7 +57,6 @@ var cmdUpload = &Command{ } func runUpload(cmd *Command, args []string) bool { - secret := security.Secret(*upload.secretKey) if len(args) == 0 { if *upload.dir == "" { return false @@ -79,7 +75,7 @@ func runUpload(cmd *Command, args []string) bool { } results, e := operation.SubmitFiles(*upload.master, parts, *upload.replication, *upload.collection, *upload.dataCenter, - *upload.ttl, *upload.maxMB, secret) + *upload.ttl, *upload.maxMB) bytes, _ := json.Marshal(results) fmt.Println(string(bytes)) if e != nil { @@ -98,7 +94,7 @@ func runUpload(cmd *Command, args []string) bool { } results, _ := operation.SubmitFiles(*upload.master, parts, *upload.replication, *upload.collection, *upload.dataCenter, - *upload.ttl, *upload.maxMB, secret) + *upload.ttl, *upload.maxMB) bytes, _ := json.Marshal(results) fmt.Println(string(bytes)) } |
