Browse Source

Treat unknown attachment types as binary on board import/clone

Fixes missing attachments and even missing
Daniel Eder 4 years ago
parent
commit
6bd7f40511
1 changed files with 6 additions and 0 deletions
  1. 6 0
      models/wekanCreator.js

+ 6 - 0
models/wekanCreator.js

@@ -474,6 +474,12 @@ export class WekanCreator {
                 }
               });
             } else if (att.file) {
+              //If attribute type is null or empty string is set, assume binary stream
+              att.type =
+                !att.type || att.type.trim().length === 0
+                  ? 'application/octet-stream'
+                  : att.type;
+
               file.attachData(
                 Buffer.from(att.file, 'base64'),
                 {