|
@@ -207,6 +207,10 @@ class UtilService extends CrudService {
|
|
|
const rootPath = `${app.config.cdn.repos_root_path}`;
|
|
|
const rooturl = `${app.config.cdn.repos_root_url_experience}`;
|
|
|
const path = `${rootPath}${rooturl}`;
|
|
|
+ // 如果不存在文件夹,就创建
|
|
|
+ if (!fs.existsSync(path)) {
|
|
|
+ fs.mkdirSync(path);
|
|
|
+ }
|
|
|
const num = new Date().getTime();
|
|
|
console.log(`filepath=>${path}${fn}-${num}.docx`);
|
|
|
Packer.toBuffer(doc).then(buffer => {
|