flexbiz-server 12.5.18 → 12.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -190,7 +190,7 @@ class controllerRPT {
|
|
|
190
190
|
const result = returnvalue.data;
|
|
191
191
|
switch(ext){
|
|
192
192
|
case "xlsx":{
|
|
193
|
-
console.log("[controllerRPT] send file from worker...",ext,
|
|
193
|
+
console.log("[controllerRPT] send file from worker...",ext,",is buffer: ",Buffer.isBuffer(result));
|
|
194
194
|
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
195
195
|
res.setHeader('Content-Disposition', 'attachment; filename="' + rptId + '".xlsx');
|
|
196
196
|
//convert sang buffer nếu data là một object có type ==Buffer
|
|
@@ -230,6 +230,7 @@ class controllerRPT {
|
|
|
230
230
|
data = Buffer.from(data, 'base64');
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
|
+
console.error("[controllerRPT] Dữ liệu không hợp lệ. Data type:", typeof(data))
|
|
233
234
|
return res.status(400).send({error:'Dữ liệu không hợp lệ'});
|
|
234
235
|
}
|
|
235
236
|
|
|
@@ -37,7 +37,7 @@ const handleReport =async (msg)=>{
|
|
|
37
37
|
result = JSON.parse(JSON.stringify(result));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
console.log("[reportWorker] result type",typeof(result));
|
|
40
|
+
//console.log("[reportWorker] result type",typeof(result));
|
|
41
41
|
console.log("[reportWorker] data type is buffer",Buffer.isBuffer(result?.data));
|
|
42
42
|
}
|
|
43
43
|
|