const fs = require('fs'); const qiniu = require('qiniu'); var accessKey = '你的accessKey'; var secretKey = '你的secretKey';
var mac = new qiniu.auth.digest.Mac(accessKey, secretKey); // 获取七牛token var options = { scope: '你的空间名', expires: 7200 }; var putPolicy = new qiniu.rs.PutPolicy(options); var uploadToken = putPolicy.uploadToken(mac);
标签:前端,qiniu,secretKey,获取,token,var,accessKey From: https://www.cnblogs.com/iuniko/p/17443221.html