1.0.13 • Published 5 years ago
hc-mid-resave-assets v1.0.13
hc-mid-resave-assets
honeycomb hc-bee middleware to resave assets in UGC.
install
npm i -S hc-mid-resave-assets
usage
In file config/config_default.js
{
...
middleware:{
resaveAssets:{
config: {
ignore: [
'*://*.aliyuncs.com/*' // url patterns
],
resavePath: {
'/post/user/:id': {
method: 'post', // can be ignore
md: [],
rich: []
}
},
oss: {
protocol: 'https:',
dir: 'public/assets',
region: 'oss-cn-shanghai',
bucket: 'myfiles',
accessKeyId: 'xxxx',
accessKeySecret: 'xxxx',
}
}
}
}
}
The ignore
format can reference url-match-patterns