Skip to content

Commit

Permalink
upgrade put.go 发现七牛云的一个bug,已经咨询七牛云了
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcoder committed Jan 20, 2021
1 parent b465b81 commit 73d6667
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions cmd/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,22 @@ func put(cmd *cobra.Command, params []string){

//一点点小bug,没有办法的解决办法
//好傻逼啊!
if path == upload {
err := os.Chdir(".")
if err != nil {
fmt.Println("err")
}
} else {

err := os.Chdir(path[0:index+1])
err := os.Chdir(path[0:index+1])
path = upload
if err != nil {

if err != nil {

fmt.Println("err")
fmt.Println("err")

}
}

path = upload

putPolicy = storage.PutPolicy{

Scope: fmt.Sprintf("%s:%s", bucket, path),
Expand Down Expand Up @@ -143,7 +148,7 @@ func put(cmd *cobra.Command, params []string){
},
}

fmt.Println(upload)
//fmt.Println(upload)

err = formUploader.PutFile(context.Background(), &ret, upToken, upload, path, &putExtra)

Expand Down

0 comments on commit 73d6667

Please sign in to comment.