stc-cdn-oss
v0.0.1
Published
stc上传CDN到阿里云
Downloads
3
Readme
stc-cdn-oss
stc上传CDN到阿里云
例子
var ossOptions = {
accessKeyId: 'xxx',
accessKeySecret: 'yyyyyy',
bucket: 'mystatic',
region: 'oss-cn-beijing'
};
var cdnHost = 'http://mystatic.oss-cn-beijing.aliyuncs.com';
var urlParse = function(md5, basename, extname){
return ['', extname, md5, basename].join('/');
};
var stcCdnOSS = require('stc-cdn-oss');
var cdnAdapter = stcCdnOSS(ossOptions, cdnHost, urlParse);
stc.workflow({
cdn: { plugin: cdn, options: { adapter: cdnAdapter})
});
stc.start();