lrf402788946 пре 4 година
родитељ
комит
383b78a202
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      app/service/util.js

+ 3 - 2
app/service/util.js

@@ -207,10 +207,11 @@ 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}`;
+    const num = new Date().getTime();
     Packer.toBuffer(doc).then(buffer => {
-      fs.writeFileSync(`${path}${fn}.docx`, buffer);
+      fs.writeFileSync(`${path}${fn}-${num}.docx`, buffer);
     });
-    return `/files${rooturl}${fn}.docx`;
+    return `/files${rooturl}${fn}-${num}.docx`;
   }
 }