Forum Discussion

ppamula's avatar
ppamula
Contributor
5 years ago

png attachment success response but blank data in the attachement

My requirement is to attach .png file into community using HTTP Client . I am able to attach .png file but when i open the file in the community it is blank

4 Replies

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    5 years ago

    Hi ppamula Could you please add the call that you're using and a screenshot of what you're experiencing? Hopefully we can get to the bottom of this.

  • ppamula's avatar
    ppamula
    Contributor
    5 years ago

    Hi Suzie

     

    I am making an API call to https://communitydev.alteryx.com/api/2.0/messages

    using Dell Boomi Integration Platform.

    Passing below:{
    "api.request": {
    "value": "{ data: { type: attachment, field: attachment1 } }",
    "type": "data"
    },
    "attachment1": {
    "value": "test123.png",
    "Content-Type": "application/octet-stream",
    "Content-Transfer-Encoding": "binary",
    "type": "key"
    }
    }

    Boomi is Generating this :
     

    Message-ID: <1601146937.152.1578604664233.JavaMail.IR-LT-767$@IR-LT-767>
    MIME-Version: 1.0
    Content-Type: multipart/form-data;
    boundary="----=_Part_151_403176794.1578604664218"

    ------=_Part_151_403176794.1578604664218
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Content-Disposition: form-data; name="api.request"

    { data: { type: attachment, field: attachment1 } }
    ------=_Part_151_403176794.1578604664218
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary
    Content-Disposition: form-data; name="attachment1"; filename=test123.png

  • ppamula's avatar
    ppamula
    Contributor
    5 years ago

    Please let me know if there is any update on this. 

     

    Thanks

  • AndrewF's avatar
    AndrewF
    Khoros Oracle
    5 years ago

    Try downloading the raw attachment file and looking at its contents. The file data could be getting corrupted before reaching the server.  Note that in the request contents you pasted, there is no actual image data.

    You could also try to adjust the integration so that it specifically sends the file with an image/png content-type instead of application/octet-stream.