Browse Source

better slug and options processing for createMulter

pull/2/head
Rob Colbert 3 years ago
parent
commit
4fe682739b
  1. 8
      lib/site-controller.js

8
lib/site-controller.js

@ -37,8 +37,12 @@ class SiteController extends SiteCommon {
} }
createMulter (slug, options) { createMulter (slug, options) {
slug = slug || 'uploads'; if (!!slug && (typeof slug === 'object')) {
options = slug;
slug = this.component.slug;
} else {
slug = slug || this.component.slug;
}
options = Object.assign({ options = Object.assign({
dest: `/tmp/${this.dtp.config.site.domainKey}/${slug}/${this.component.slug}` dest: `/tmp/${this.dtp.config.site.domainKey}/${slug}/${this.component.slug}`
}, options || { }); }, options || { });

Loading…
Cancel
Save