I have a boomi process which takes the file content and send it to salesforce to create attachment. But attachment is blank.
Here is my code:
String jsonStr = 'iVBORw0KGgoAAAANSUhEUgAABo4AAAMgCAYAAAAdtpBIAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAP+lSURBVHhe7P15dFRXnub9qv6447p/9Fq3V+aq9d57q7vve7u6K7s6q1z9ZnWnszOd2W47M92Zdk52OT2nZ4zxANgYbAwGbAy2Gcw8GMw8g5kHM8/zIECMEgIJxCjmGf9uPFuxxVHElhQKhRQh6fhBBCCCGEEEIIIYQQQgghzSNVi6PnIx8TE7s9tAJCCCGEEEIIIYQQQgghhBDSPJL3b5//2v7tCxXT0bnPn';
Attachment attach = new Attachment();
attach.contentType = 'image/png';
attach.name = 'test.png';
attach.parentId = '0010H00002DW2Ds';
attach.body = EncodingUtil.base64Decode(jsonStr);
insert attach;
Attachment is inserted but there is no content inside. Is there anything I am doing wrong.
Thank you, Thiru