Seven cows mkzip has gone mad?

  node.js, question

It can be used normally some time ago. I don’t know why I keep reporting during the test these two days.bad tokenError.

I substituted the file name of the example in the seven cow document into the algorithm test and got itbodyJust like the example given in the document. The Token generation algorithm is the same as that of the Seven Cattle SDK inside.

I checked the process several times and found no problem. I had to ask for help to catch worms.

import request from 'superagent';
 
 let __qiniuAccessKey = 'xxxx';
 let __qiniuSecretKey = 'xxxx';
 
 function makezip() {
 let uri =  'http://api.qiniu.com/pfop/' ;
 let key = 'uploads/123456.jpg';
 
 let photoUrl =  'http://7xizen.com1.z0.glb.clouddn.com/uploads/123456.jpg' ;
 PhotoUrl = 'url/' plus encodeUrlSafeBase64(photoUrl);
 
 let saveas = 'contest:test.zip';
 Saveas = '|saveas/' plus encodeUrlSafeBase64(saveas as);
 
 let param = {
 bucket: 'contest',
 key,
 Fops: 'mkzip/2/' plus photoUrl plus saveas,
 force: 1
 bracket
 let body = querystring.stringify(param);
 
 let pathname = url.parse(uri).path;
 Let access = pathname plus' \n' plus body;
 let digest = hmacSha1(access, __qiniuSecretKey);
 Digest = digest.replace(/\ plus /g, '-').replace(/\//g, '_');
 
 Let accessToken = 'QBox' plus _ __qiniuAccessKey plus':' plus digest;
 
 request
 .post(uri)
 .set('Content-Type', 'application/x-www-form-urlencoded')
 .set('Authorization', accessToken)
 .send(body)
 .end((err, res) => {
 console.log(res.body);
 })
 bracket
 
 function encodeUrlSafeBase64(string) {
 let s = new Buffer(string).toString('base64');
 S = s.replace(/\ plus /g, '-').replace(/\//g, '_');
 return s;
 bracket
 
 function hmacSha1(encodedFlags, secretKey) {
 var hmac = crypto.createHmac('sha1', secretKey);
 hmac.update(encodedFlags);
 return hmac.digest('base64');
 bracket

AccessKeyAndSecretKeyIt has been checked repeatedly. No problem. The resources are confirmed to be accessible on the public network.

Have you solved this problem, I am also looking for the problem, the execution feels successful, the space is no new zip file