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

Community site session details

Session Id : q7tC2sA54SBEeBm75w+p2L
Power Automate - Building Flows
Unanswered

HTTP Post multipart/form-data code 200

Like (0) ShareShare
ReportReport
Posted on 5 Aug 2021 08:52:02 by 29

Hello,

I'm trying to build a flow to upload a pdf file to an third application using API.
I have to use multipart/form-data. With postman it's working well but not with flow. I have no error (code 200) but the file is not created.

 

Below my http request on flow.

 

 

 

 

{
 "$content-type": "multipart/form-data",
 "$multipart": [
 {
 "headers": {
 "Content-Disposition": "form-data; name=\"uploadManifest\""
 },
 "body": {
 "$content": {
 "input": {
 "name": "upload.pdf",
 "_filename": [
 "@{items('Appliquer_à_chacun_2')['link']}"
 ],
 "entities_id": 1
 }
 }
 }
 },
 {
 "headers": {
 "Content-Disposition": "form-data; name=\"file\"; filename=\"@{items('Appliquer_à_chacun_2')['link']}\""
 },
 "body": {
		"$content": {
			"$content-type":"application/pdf",
			"$content": "@{base64(body('Get_file_content'))}"
			}
	 }
 }
 ]
}

 

 

 I have only this instruction : 

 

$ curl -X POST \
-H 'Content-Type: multipart/form-data' \
-H "Session-Token: 83af7e620c83a50a18d3eac2f6ed05a3ca0bea62" \
-H "App-Token: f7g3csp8mgatg5ebc5elnazakw20i9fyev1qopya7" \
-F 'uploadManifest={"input": {"name": "Uploaded document", "_filename" : ["file.txt"]}};type=application/json' \
-F 'filename[0]=@file.txt' \
'http://path/to/glpi/apirest.php/Document/'

Thanks for your help 

I have the same question (0)
  • keepcool52 Profile Picture
    29 on 16 Feb 2022 at 08:15:00
    Re: HTTP Post multipart/form-data code 200

    Ok je suis encore en 9.5.2 pour la GLPI mais je vais creuser l'histoire de la version de PHP.
    Merci en tout cas

  • BastienTravers Profile Picture
    20 on 16 Feb 2022 at 08:01:26
    Re: HTTP Post multipart/form-data code 200

    C’est suite à des tests. Avec la version 10 de GLPI je suis passé en php8 et 8.1 mais j’ai des erreurs. Il y a certainement une solution mais du coup je suis resté en 7.4

  • keepcool52 Profile Picture
    29 on 16 Feb 2022 at 07:54:59
    Re: HTTP Post multipart/form-data code 200

    Ah mince, effectivement je suis en 8.0 pour le php.
    Tu l'as vu quelque part que ça ne marchait pas en 8.0 où c'est suite à des tests que tu t'en est apperçu ?

  • BastienTravers Profile Picture
    20 on 16 Feb 2022 at 06:52:10
    Re: HTTP Post multipart/form-data code 200

    Je n'arrive pas à exporter l'application j'ai une erreur, désolé. Je ne sais pas trop comment partager autrement. Sinon tu me donnes la main sur ton appli. Bref désolé je vois pas trop comment t'aider. 

    Tu as quelle version de PHP sur ton serveur GLPI ? je suis en PHP 7.4 et ça fonctionne bien. En revanche en 8 et 8.1 ça fonctionne pas. C'est peux être ça ?

  • keepcool52 Profile Picture
    29 on 14 Feb 2022 at 22:34:13
    Re: HTTP Post multipart/form-data code 200

    Ah oui, c'est pas la porte à côté lol 

  • BastienTravers Profile Picture
    20 on 14 Feb 2022 at 22:13:43
    Re: HTTP Post multipart/form-data code 200

    Je suis en Nouvelle-Calédonie 🙂

  • keepcool52 Profile Picture
    29 on 14 Feb 2022 at 22:06:35
    Re: HTTP Post multipart/form-data code 200

    Top merci, je suis de Bordeaux et toi ? 

  • BastienTravers Profile Picture
    20 on 14 Feb 2022 at 21:52:08
    Re: HTTP Post multipart/form-data code 200

    As ba si tu es français c'est effectivement plus simple. Tu es d'où ? J'ai un GLPI de Démo je te fais ça dès que possible.

  • keepcool52 Profile Picture
    29 on 14 Feb 2022 at 21:44:12
    Re: HTTP Post multipart/form-data code 200

    Ah ben si t'es français ça seras plus simple 🙂

    Ppur le coup je veux bien du coup que tu me files un exemple d'apps qui marche chez toi.

    Car j'ai vraiment tester beaucoup d'astuces et du coup je me demande si ça vient pas de mon glpi. 

  • BastienTravers Profile Picture
    20 on 14 Feb 2022 at 21:20:15
    Re: HTTP Post multipart/form-data code 200

    Sorry I'm French and I use google translate because I speak English badly.

    Yes if you want me to look the easiest way is to send me your application. Or I can give you an example of an application that works. Like you want

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading complete