Skip to main content

Upload a file or record as multipart/form-data

Comments

7 comments

  • Bhushan Rane Integration Engineer

    Quite helpful to understand multipart-form/data. Is an XML payload supported as well in the body? 

    0
  • Stephen Brandt Docs Team Lead Community moderator

    Thanks for helping us to clarify and assist other readers, Bhushan Rane. Yes indeed, you may import XML-formatted records. 

    0
  • Alaa Okby NetSuite Integration Whiz Salesforce Integration Whiz Referral Partner
    Celigo University Level 4: Legendary

    Hello Stephen,

    I did the same but I got from integrator.io this error and I don't know why 

    (The body does not have valid data required for multipart/form-data request. Details=Invalid json string provided for body.)
     
     
    0
  • Stephen Brandt Documentation Manager Community moderator
    Engaged
    Great Answer
    Top Contributor
    Celigo University Level 3: Master

    Hi, Alaa Okby. I started a support ticket so that our team can try to look at the data you're submitting. (I'll keep an eye on it to see if anything in this article might have misled you.)

    I would hope that the field editor might have alerted you to any JSON syntax errors, so there is probably an issue elsewhere in your flow – or perhaps something unique in your destination app's requirements. 

    0
  • Alaa Okby NetSuite Integration Whiz Salesforce Integration Whiz Referral Partner
    Celigo University Level 4: Legendary

    actually, the error prevents me from saving the module so that is before running the flow.

    0
  • Bhushan Rane Integration Engineer

    We had a use case where there were additional attributes that needed to be sent along with the main attachment/blob, in this case we figured each unique attribute had to be a name value pair shown below. 

    [
    {
    "name": "UploadFile",
    "value": "{{blob}}",
    "type": "attachment"
    },
    { "name": "signature", "value" : "{{{record.signatureOnly}}}"},
    { "name": "clientApp", "value" : "{{record.signatureData.0.clientApp}}"},
    { "name": "dbname", "value" : "{{record.signatureData.0.dbname}}"}
    ]

    0
  • Alaa Okby NetSuite Integration Whiz Salesforce Integration Whiz Referral Partner
    Celigo University Level 4: Legendary

    Hello Bhushan,

    I tried it and it worked but what are the new attributes for? as I don't have these attributes in my record data.

    Thanks

     

    0

Please sign in to leave a comment.