Skip to content

Commit

Permalink
fix: to fix callback customValue (#1126)
Browse files Browse the repository at this point in the history
Co-authored-by: xt01102058 <xt01102058@alibaba-inc.com>
  • Loading branch information
taotao7 and xt01102058 committed Jul 26, 2022
1 parent ed8d997 commit e6cdfe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports.encodeCallback = function encodeCallback(reqParams, options) {
if (options.callback.customValue) {
const callbackVar = {};
Object.keys(options.callback.customValue).forEach((key) => {
callbackVar[`x:${key}`] = options.callback.customValue[key];
callbackVar[`x:${key}`] = options.callback.customValue[key].toString();
});
reqParams.headers['x-oss-callback-var'] = Buffer.from(JSON.stringify(callbackVar)).toString('base64');
}
Expand Down

0 comments on commit e6cdfe5

Please sign in to comment.