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
10 replies
Subscribers
6 subscribers
Views
5119 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi, I am trying to download a file using the Send HTTP Request
skumar
over 11 years ago
Hi,
I am trying to download a file using the Send HTTP Request smart service and my approach is :
1. Send HTTP request.
2. Store response body into a PV
3. Convert response body into Appian Document using "Appian Document from Base64 String" Smart Service.
It successfully downloads images or audio files but not word, excel or pdf files.
What changes do I need to make in my process in order to download these files too ?...
OriginalPostID-104595
OriginalPostID-104595
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 11 years ago
Does it give you an error?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
skumar
over 11 years ago
Hi Eduardo,
It doesn't give any error. I worked a lot on this and found that images and audio files are received as inline content in response of http request while word, excel, pdf etc. comes as an attachment. Is this the reason why these files are not downloaded ?
If yes, then how do I fix this issue ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 11 years ago
I think that has to do with how the HTTP server sends the files. Are you able to check the HTTP headers the server generates and how the differ for images and word files?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
skumar
over 11 years ago
Yes, I am able to check headers.
for images: Content-Disposition = inline
for word files : Content-Disposition = attachment
Every file with "Content-Disposition = inline" is successfully download but it can't download file with "Content-Disposition = attachment"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 11 years ago
All the other headers are the same? Are you able to modify the webserver config? If so you should be able to change these headers.
@Appian: What headers are supported by this smart service? Please add this to the docs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
This is not an out of the box smart service so we'll have to have the author of the plug-in confirm.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
Also keep in mind the plug-in comes with the source code so you can either increase the logging level or review the source code for more information.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
skumar
over 11 years ago
Just an update...
I tried to download doc and xls files using the same mechanism. These files were successfully downloaded. It seems that the smart service cannot be used to download office 2007 format files.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 11 years ago
Checkout:
forum.appian.com/.../e-71342
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
skumar
over 11 years ago
Thanks Patty,
This thread was very helpful.
Changing the Return Content Type works for us.
Thanks,
Sandeep
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel