2
0
Shun Miyazawa 10 сар өмнө
parent
commit
c201563a1b

+ 2 - 0
apps/app/src/server/service/attachment.js

@@ -72,6 +72,8 @@ class AttachmentService {
           },
           },
           async flush(callback) {
           async flush(callback) {
             try {
             try {
+              // At this point we have the complete file as a Buffer
+              // This approach assumes handler needs the complete file data
               const completeData = Buffer.concat(chunks);
               const completeData = Buffer.concat(chunks);
               await handler(pageId, attachment, file, completeData);
               await handler(pageId, attachment, file, completeData);
               callback();
               callback();