web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to handle multipar...
Power Apps
Answered

How to handle multipart/form-data with diffrent body schema

(0) ShareShare
ReportReport
Posted on by 174

Hey,

 

I am looking for a hint to pass a multipart/form-data record with a diffrent body schema. Within PowerApps I receive the error due to the different schema and I dont see any chance to set the default values at Power Automate/Custom Connector. Or did I miss something at the settings? 

 

First Body Record = String

Second Body record = Object

 

CustomConnector.UploadFile(
 {
 '$content-type': "multipart/form-data",
 '$multipart': [
 {
 headers: {'Content-Disposition': "form-data; name=\'type\'"},
 body: "voucher"
 },
 {
 headers: {
 'Content-Disposition': "form-data; name=\'file\'; filename=\'Filename\'"
 },
 body: {
 '$content-type': "application/pdf",
 '$content': "content"
 }
 }
 ]
 }
)

 

Categories:
I have the same question (0)
  • Verified answer
    ApiTrader Profile Picture
    174 on at

    Solved

     

    Swagger definition:

      /files:
        post:
          consumes:
            - multipart/form-data
          produces:
            - application/json
          responses:
            '200':
              description: default
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: id
              headers:
                Accept:
                  description: Accept
                  type: string
          summary: Upload a File
          operationId: UploadFile
          parameters:
            - in: formData
              name: file
              type: file
              format: binary
              required: true
              description: The file to upload.
            - in: formData
              name: type
              type: string
              required: true
              description: Description of file contents.
          description: Use this endpoint to upload files

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard