aboutsummaryrefslogtreecommitdiff
path: root/weed/command/upload.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2016-07-20 23:45:55 -0700
committerChris Lu <chris.lu@gmail.com>2016-07-20 23:45:55 -0700
commitcdae9fc680c8e7f99c0ef47dd98f674df76e5078 (patch)
tree8189bdfb1f38fce7ddc2a2ff73ab040caeb5f30a /weed/command/upload.go
parent40ba6d2a6f146ab730cc5409c3dbcfb71f7acab9 (diff)
downloadseaweedfs-cdae9fc680c8e7f99c0ef47dd98f674df76e5078.tar.xz
seaweedfs-cdae9fc680c8e7f99c0ef47dd98f674df76e5078.zip
add "weed copy" command to copy files to filer
Diffstat (limited to 'weed/command/upload.go')
-rw-r--r--weed/command/upload.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/command/upload.go b/weed/command/upload.go
index 0dfa115bb..1f0696f70 100644
--- a/weed/command/upload.go
+++ b/weed/command/upload.go
@@ -15,7 +15,7 @@ var (
)
type UploadOptions struct {
- server *string
+ master *string
dir *string
include *string
replication *string
@@ -28,7 +28,7 @@ type UploadOptions struct {
func init() {
cmdUpload.Run = runUpload // break init cycle
cmdUpload.IsDebug = cmdUpload.Flag.Bool("debug", false, "verbose debug information")
- upload.server = cmdUpload.Flag.String("server", "localhost:9333", "SeaweedFS master location")
+ upload.master = cmdUpload.Flag.String("master", "localhost:9333", "SeaweedFS master location")
upload.dir = cmdUpload.Flag.String("dir", "", "Upload the whole folder recursively if specified.")
upload.include = cmdUpload.Flag.String("include", "", "pattens of files to upload, e.g., *.pdf, *.html, ab?d.txt, works together with -dir")
upload.replication = cmdUpload.Flag.String("replication", "", "replication type")
@@ -39,7 +39,7 @@ func init() {
}
var cmdUpload = &Command{
- UsageLine: "upload -server=localhost:9333 file1 [file2 file3]\n weed upload -server=localhost:9333 -dir=one_directory -include=*.pdf",
+ UsageLine: "upload -master=localhost:9333 file1 [file2 file3]\n weed upload -server=localhost:9333 -dir=one_directory -include=*.pdf",
Short: "upload one or a list of files",
Long: `upload one or a list of files, or batch upload one whole folder recursively.
@@ -79,7 +79,7 @@ func runUpload(cmd *Command, args []string) bool {
if e != nil {
return e
}
- results, e := operation.SubmitFiles(*upload.server, parts,
+ results, e := operation.SubmitFiles(*upload.master, parts,
*upload.replication, *upload.collection,
*upload.ttl, *upload.maxMB, secret)
bytes, _ := json.Marshal(results)
@@ -98,7 +98,7 @@ func runUpload(cmd *Command, args []string) bool {
if e != nil {
fmt.Println(e.Error())
}
- results, _ := operation.SubmitFiles(*upload.server, parts,
+ results, _ := operation.SubmitFiles(*upload.master, parts,
*upload.replication, *upload.collection,
*upload.ttl, *upload.maxMB, secret)
bytes, _ := json.Marshal(results)