Merge pull request #3395 from daniel-eder/fix/clone-board-binary-attachments

Treat unknown attachment types as binary on board import/clone
This commit is contained in:
Lauri Ojansivu 2020-12-17 17:36:02 +02:00 committed by GitHub
commit 86c7fbd717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'),
{