Skip to content

tiantour/image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

upload image to server,qiniu,upaiyun with go

qiniu demo


import (
	"fmt"

	"github.com/tiantour/image/qiniu"
)

func main() {
	qiniu.AccessKey = "your access key"
	qiniu.SecretKey = "your secret key"
	err := qiniu.NewUpload().FromFile(&qiniu.Qiniu{
		Bucket:    "your bucket",
		Key:       "your file name",
		LocalPath: "your file path",
	})
	fmt.Println(err)
}

upyun demo


import (
	"fmt"

	"github.com/tiantour/image/upyun"
)

func main() {
	upyun.Operator = "your operator"
	upyun.Password = "your password"
	err := upyun.NewUpload().FromFile(&upyun.Upyun{
		Bucket:    "your bucket",
		Key:       "your file name",
		LocalPath: "your file path",
	})
	fmt.Println(err)
}```

About

upload image to server,qiniu,upaiyun with go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages