Skip to content

Commit

Permalink
bump version to v7.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bachue committed Oct 21, 2024
1 parent 66642cb commit 1670a19
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## CHANGE LOG

## v7.9.0 (2024-10-21)

- 支持工作流模版

## v7.8.0 (2024-08-27)

- 支持闲时任务和 prefop 接口
Expand Down
34 changes: 23 additions & 11 deletions qiniu/fop.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,20 @@ Qiniu_Error Qiniu_FOP_Pfop_v2(Qiniu_Client *self, Qiniu_FOP_PfopRet *ret, Qiniu_
char *typeStr = NULL;
char *url = NULL;
char *body = NULL;
Qiniu_Bool escapeBucketOk;
Qiniu_Bool escapeKeyOk;
Qiniu_Bool escapeFopsOk;
Qiniu_Bool escapePipelineOk;
Qiniu_Bool escapeNotifyURLOk;
Qiniu_Bool escapeBucketOk = Qiniu_False;
Qiniu_Bool escapeKeyOk = Qiniu_False;
Qiniu_Bool escapeFopsOk = Qiniu_False;
Qiniu_Bool escapePipelineOk = Qiniu_False;
Qiniu_Bool escapeNotifyURLOk = Qiniu_False;

// Add encoded bucket
encodedBucket = Qiniu_QueryEscape(params->bucket, &escapeBucketOk);
encodedKey = Qiniu_QueryEscape(params->key, &escapeKeyOk);
fopsStr = Qiniu_String_Join(";", params->fops, params->fopCount);
encodedFops = Qiniu_QueryEscape(fopsStr, &escapeFopsOk);
Qiniu_Free(fopsStr);
if (params->fopCount > 0 || params->fops){
fopsStr = Qiniu_String_Join(";", params->fops, params->fopCount);
encodedFops = Qiniu_QueryEscape(fopsStr, &escapeFopsOk);
Qiniu_Free(fopsStr);
}

if (params->pipeline)
{
Expand Down Expand Up @@ -84,9 +86,19 @@ Qiniu_Error Qiniu_FOP_Pfop_v2(Qiniu_Client *self, Qiniu_FOP_PfopRet *ret, Qiniu_
typeStr = "0";
}

body = Qiniu_String_Concat("bucket=", encodedBucket, "&key=", encodedKey, "&fops=", encodedFops,
"&pipeline=", encodedPipeline, "&notifyURL=", encodedNotifyURL, "&force=", forceStr,
"&type=", typeStr, NULL);
if (escapeFopsOk)
{
body = Qiniu_String_Concat("bucket=", encodedBucket, "&key=", encodedKey, "&fops=", encodedFops,
"&pipeline=", encodedPipeline, "&notifyURL=", encodedNotifyURL, "&force=", forceStr,
"&type=", typeStr, NULL);
}
else
{
body = Qiniu_String_Concat("bucket=", encodedBucket, "&key=", encodedKey, "&workflowTemplateID=", params->workflowTemplateID,
"&pipeline=", encodedPipeline, "&notifyURL=", encodedNotifyURL, "&force=", forceStr,
"&type=", typeStr, NULL);
}

if (escapeBucketOk)
{
Qiniu_Free(encodedBucket);
Expand Down
1 change: 1 addition & 0 deletions qiniu/fop.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ typedef struct _Qiniu_FOP_PfopParams
const char *key;
const char *pipeline;
const char *notifyURL;
const char *workflowTemplateID;
char **fops;
int fopCount;
int force;
Expand Down
4 changes: 4 additions & 0 deletions qiniu/rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ char *Qiniu_RS_PutPolicy_Token(Qiniu_RS_PutPolicy *auth, Qiniu_Mac *mac)
{
cJSON_AddStringToObject(root, "persistentPipeline", auth->persistentPipeline);
}
if (auth->persistentWorkflowTemplateID)
{
cJSON_AddStringToObject(root, "persistentWorkflowTemplateID", auth->persistentWorkflowTemplateID);
}
if (auth->mimeLimit)
{
cJSON_AddStringToObject(root, "mimeLimit", auth->mimeLimit);
Expand Down
1 change: 1 addition & 0 deletions qiniu/rs.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ typedef struct _Qiniu_RS_PutPolicy {
const char *persistentOps;
const char *persistentNotifyUrl;
const char *persistentPipeline;
const char *persistentWorkflowTemplateID;
const char *mimeLimit;
Qiniu_Uint64 fsizeLimit;
Qiniu_Uint64 fsizeMin;
Expand Down

0 comments on commit 1670a19

Please sign in to comment.