Closed
Description
I am using node-webkit with qiniu/nodejs-sdk. I am uploading an 7KB image with following code, almost identical to the code in examples.
function getUploadToken(bucketName) {
var putPolicy = new qiniu.rs.PutPolicy(bucketName);
return putPolicy.token();
}
function uploadFile(localFile, key) {
var extra = new qiniu.io.PutExtra(),
token = getUploadToken($('#bucket_name').val());
qiniu.io.putFile(token, key, localFile, extra, function(err, ret) {
if(!err) {
console.log(ret.key, ret.hash);
} else {
console.log(err);
}
});
}
But when I try to upload the image, I got a RangeError: Attempt to allocate Buffer larger than maximum size: 0x3fffffff bytes.
Metadata
Metadata
Assignees
Labels
No labels