Categorygithub.com/scott-x/oss
repositorypackage
0.0.0-20240423173608-349689f59993
Repository: https://github.com/scott-x/oss.git
Documentation: pkg.go.dev

# README

oss

utils based on aliyun-oss-go-sdk

usage

1. create a file named oss-conf.json in your project

{
    "endpoint" : "",
    "accessKeyId" : "",
    "accessKeySecret":"",
    "bucketName": ""
}

Then fill in the necessary data

2. use the tool, main.go

package main

import (
	"github.com/scott-x/oss"
)

func main(){
	oss.SetConfigFile("/my/config/path") //if not set, will be oss-conf.json 
	oss.Upload("a.png",true)
	oss.ListAll()
}