diff --git a/docs/README.md b/docs/README.md index 8003237b..801792e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -253,10 +253,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l { Qiniu_Error err; Qiniu_Io_PutRet putRet; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, NULL); if (err.code != 200) { debug(client, err); return NULL; @@ -271,10 +268,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l int simple_upload(Qiniu_Client* client, char* uptoken, const char* key, const char* localFile) { Qiniu_Error err; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, NULL); return err.code; } ``` diff --git a/docs/gist/client.c b/docs/gist/client.c index 2de4f019..8e35d7ae 100644 --- a/docs/gist/client.c +++ b/docs/gist/client.c @@ -17,10 +17,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l { Qiniu_Error err; Qiniu_Io_PutRet putRet; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, NULL); if (err.code != 200) { debug(client, err); return NULL; @@ -33,10 +30,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l int simple_upload(Qiniu_Client* client, char* uptoken, const char* key, const char* localFile) { Qiniu_Error err; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, NULL); return err.code; } /* @endgist */