問題1:scope指定了bucket:key之后就報錯誤:{"error":"bad token"} scope只指定bucket就沒有錯誤。為什么?問題2:目錄src/github.com/qiniu/api/rs下,填好了ak,sk,bucketName,domain之后,執行 go test,報錯: --- FAIL: TestEntry (0.33s)rs_api_test.go:74: {"error":"","reqid":"4FcAAK-3snaLN70T","details":["RS/403"],"code":403} --- FAIL: TestGetPrivateUrl (0.30s)panic: runtime error: slice bounds out of range [recovered] panic: runtime error: slice bounds out of range
2 回答

撒科打諢
TA貢獻1934條經驗 獲得超2個贊
問題應該出在,put函數中的key和scope中指定的key不一致,scope制定的key,需要和下面函數中的key完全一致即可。
func Put(l rpc.Logger, ret interface{}, uptoken, key string, data io.Reader, extra *PutExtra) error { return putReader(l, ret, uptoken, key, true, data, extra) }
- 2 回答
- 0 關注
- 806 瀏覽
添加回答
舉報
0/150
提交
取消