Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
15 replies
Subscribers
5 subscribers
Views
9363 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hello, has anyone managed to send a file with the HTTP request plugin? If yes, c
fabienb
A Score Level 1
over 11 years ago
Hello, has anyone managed to send a file with the HTTP request plugin? If yes, could you explain how to set the parameters? Thank you....
OriginalPostID-106410
OriginalPostID-106410
Discussion posts and replies are publicly visible
0
fabienb
A Score Level 1
over 11 years ago
Small win. char(13)&char(10) should be used to build the body. The new error message is =concat("--AaB03x",char(13)&char(10),"Content-Disposition: form-data;name=""file"";filename=""aps.js""",char(13)&char(10),"Content-Type: application/octet-stream",char(13)&char(10),"test",char(13)&char(10),"--AaB03x--")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
I mean {"code":"BadRequestError","message":"MultipartParser.end(): stream ended unexpectedly: state = PART_DATA"}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
Done! Here is the final body message:
=concat("--AaB03x",char(13)&char(10),"Content-Disposition: form-data;name=""file"";filename=""testfab""",char(13)&char(10),"Content-Type: application/octet-stream",char(13)&char(10)&char(13)&char(10),convertdocumenttobase64(pv!Document),char(13)&char(10),"--AaB03x--",char(13)&char(10))
Best regards
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 11 years ago
Great news :-) This is really good to know.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
Definitively. Thanks for your support.
Here is an update of the message with the correct encoding type:
=concat("--AaB03x",char(13)&char(10),"Content-Disposition: form-data;name=""file"";filename=""tesfab""",char(13)&char(10),"Content-Type: application/octet-stream",char(13)&char(10),"Content-Transfer-Encoding: base64",char(13)&char(10)&char(13)&char(10),convertdocumenttobase64(pv!Document),char(13)&char(10),"--AaB03x--",char(13)&char(10))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<