Write the upload file code and report an error: invalid putpolicy options according to Qiniu Node.js SDK document

problem description

write the upload file code according to Qiniu Node.js SDK document and report an error: invalid putpolicy options

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

function uptoken(bucket, key) {
    var putPolicy = new qiniu.rs.PutPolicy(bucket+":"+key);
    return putPolicy.token();
}

what result do you expect? What is the error message actually seen?


putpolicy is specified by uploading token
check your token

Menu