Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Qiniu Resource Storage SDK for Golang

[![Qiniu Logo](http://qiniutek.com/images/logo-2.png)](http://qiniu.com/)

## 下载

### 从 release 版本下载

下载地址:https://github.com/qiniu/api/releases

这是我们建议的方式,release 版本有版本号,有 [CHANGELOG](https://github.com/qiniu/api/blob/develop/CHANGELOG.md),使用规格也会比较稳定。

### 从 git 库下载

你可以直接用 git clone 下载源代码来使用。但是请注意非 master 分支的代码在规格上可能承受变更,应谨慎使用。


## 使用

参考文档:[七牛云存储 Go SDK 使用指南](https://github.com/qiniu/api/tree/develop/docs)
Expand Down
4 changes: 3 additions & 1 deletion rs/rs_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ func init() {

// 删除 可能存在的 key
client.Delete(nil, bucketName, key)
client.Delete(nil, bucketName, newkey1)
client.Delete(nil, bucketName, newkey2)
}

func upFile(localFile, bucketName, key string) error {

policy := PutPolicy {
Scope: bucketName,
Scope: bucketName + ":" + key,
}
return io.PutFile(nil, nil, policy.Token(nil), key, localFile, nil)
}
Expand Down