Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c/c++客户端应该是有bug吧 #210

Open
feelingseas opened this issue Jun 22, 2024 · 1 comment
Open

c/c++客户端应该是有bug吧 #210

feelingseas opened this issue Jun 22, 2024 · 1 comment
Labels
help-wanted Denotes an issue that needs help from a contributor.

Comments

@feelingseas
Copy link

之用用的华东的空间,可以正常上传
最近,我更新为最新的sdk了。
我创建了一个 华南的bucket,用默认的上传程序会报错如下:

incorrect region, please use up-z2.qiniup.com, bucket is: 华南bucket

网上这个问题有好多人遇到,显示七牛在这一点上做的不好。。搜索了好久,才【不经意测试才解决】。听了sdk中的建议,结果走了大弯路。。。

主要代码如下:
Qiniu_Client_InitNoAuth(&qiniuClient, 1024);

//Qiniu_Use_Region("z2",Qiniu_False);//line A 这个无效,报错依旧
Qiniu_Use_Zone_Huanan(Qiniu_False);//line B 这个语句是正常的,程序就可以通过了

可是, conf.h文件中,有如下建议

// 不再推荐使用,建议使用 Qiniu_Use_Region("z2") 方法替代
QINIU_DLLAPI extern void Qiniu_Use_Zone_Huanan(Qiniu_Bool useHttps);

所以,这个建议显然 无效了,旧版的才可以。(另 Qiniu_Use_Region("z2"),不只一个参数。)

补充:sdk 用的是最新的。
再补充:这句会更好一些,自动判断区域。不用指定region
Qiniu_Client_EnableAutoQuery(&qiniuClient, Qiniu_False); /* 启用区域自动查询,无需手动设置区域 */

@bachue
Copy link
Contributor

bachue commented Aug 4, 2024

Screenshot 2024-08-04 at 20 57 46 开发者文档上对于该接口的使用其实有相应的描述。

@bachue bachue added the help-wanted Denotes an issue that needs help from a contributor. label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Denotes an issue that needs help from a contributor.
Projects
None yet
Development

No branches or pull requests

2 participants