Skip to content

Commit

Permalink
update gist files
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jun 29, 2013
1 parent 1286f5e commit 942570a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
```
Expand Down
10 changes: 2 additions & 8 deletions docs/gist/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down

0 comments on commit 942570a

Please sign in to comment.