skipper-qiniu-qn

Another Skipper Recevier for Sails.

Usage no npm install needed!

<script type="module">
  import skipperQiniuQn from 'https://cdn.skypack.dev/skipper-qiniu-qn';
</script>

README

skipper-qiniu-qn

使用了qn替代官方SDK。

WARNING!! 请立即更新至1.1.1及以上版本来避免可能的致命错误。

WARNING!! Please update to 1.1.1 or higher version to avoid an critical error.

Examples

req.file('avatar').upload({
  adapter: require('skipper-qiniu-qn'),
  bucket: 'development', // required
  accessKey: 'your qiniu accessKey', // required
  secretKey: 'your qiniu secretKey', // required
}, function(err, files) {
  if (err) {
    return res.serverError(err);
  }

  return res.json({
    message: files.length + ' file(s) uploaded successfully!',
    files: files
  });
});

注意:暂不支持自定义policy。