Explorar o código

Treat unknown attachment types as binary on board import/clone

Fixes missing attachments and even missing
Daniel Eder %!s(int64=4) %!d(string=hai) anos
pai
achega
6bd7f40511
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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'),
                 {