Customer Portal

Get Involved. Join the Conversation.

Topic

    Daniel Rocha
    Corrupted FileAttachmentsAnswered
    Topic posted August 30, 2019 by Daniel RochaBronze Medal: 1,250+ Points, last edited September 2, 2019 
    13 Views, 1 Comment
    Title:
    Corrupted FileAttachments
    Summary:
    Can't download FileAttachments on Custom Object
    Content:

    I have created a Custom Object with a FileAttachments field associated with it. I am filling this property from the Portal by encoding the file with the btoa() function and sending it through the Rest API. Everything is working fine in the Customer Portal and I can get it back with the atob() function.

    The problem is with the Agent Desktop and the AgentWeb (BUI). They both display the attachments correctly in the report but when I try to download them, through their respective environments, the files are corrupted.

    Does anybody have any idea why this is happening? Am I missing something when I post them through the Rest API?

    Version:
    19A

    Best Comment

    Daniel Rocha

    I should be storing the attachment without the base64 header. After this change all environments worked properly again.

    Comment

     

    • Daniel Rocha

      I should be storing the attachment without the base64 header. After this change all environments worked properly again.