laiguoran 5 anni fa
parent
commit
0d2c13cf51
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      app/controller/material_controller.js

+ 5 - 1
app/controller/material_controller.js

@@ -634,7 +634,11 @@ module.exports = app => {
                     const fileInfo = path.parse(stream.filename);
                     // const filepath = path.join('public/upload', this.ctx.tender.id.toString(), 'tc', 'fujian_' + create_time + fileInfo.ext);
                     const filepath = `public/upload/${this.ctx.tender.id.toString()}/tc/fujian_${create_time + idx + fileInfo.ext}`;
-                    await ctx.helper.saveStreamFile(stream, path.resolve(this.app.baseDir, 'app', filepath));
+                    await ctx.helper.saveStreamFile(stream, path.join(this.app.baseDir, 'app', filepath));
+
+                    if (stream) {
+                        await sendToWormhole(stream);
+                    }
                     files.push({ filepath, name: stream.filename });
                     idx++;
                 }