Hi All,
I am trying to configure a download tool using HTTP Action: Post to upload the file along with other Text Data. This includes 1 Key having File and 4 other keys having text data. I have tried various workarounds from past two three days and initially i was getting Multipart errors such as:
- fileupload.FileUploadException: the request was rejected because no multipart boundary was found","path":"/upload"}
- ":"Internal Server Error","exception":"org.springframework.web.multipart.MultipartException","message":"Current request is not a multipart request","path":"/upload"}
But then these got resolved with Boudary: webkitxxxxxxxxxxx
After all of the multiple attempts i am now stuck with new error from 2 more days i.e. ,"status":400,"error":"Bad Request","exception":"org.springframework.web.multipart.support.MissingServletRequestPartException","message":"Required request part 'file' is not present","path":"/upload"
I am sharing below the most recent screenshots for the download configuration where i am taking the data from a Text input Tool i have given the Path of the csv file along with the field file and rest is the plain text. the path of the file is from Network share which is posted in the field as \\network\folder\location\filename.csv
I alongside the Alteryx I am also trying to send the same file through POSTMAN for testing and I am getting success results in POSTMAN for which the screenshot is enclosed below:
Can someone assist with the HTTP POST Action guidance having combination of Text and File and from the Community
I am only able to find out a Post command with BLOB tool https://help.alteryx.com/current/developer-help/configuration-file-upload-workflow but this also did not worked for me.
@FadiB @TashaA i have also found some of your solutions but that are mostly relation to PUT Action or FTP acition
Kind Regards,
Rohit
Solved! Go to Solution.
@RohitChopra I have found that the best way to take a functional POSTMAN request and to convert it into the Alteryx Download tool equivalent is to take a look at the cURL code. In POSTMAN if you click the button that says "code" underneath the save button, you should be able to see the headers and payload that are getting passed to the API endpoint. This tends to be much easier than clicking through the different pieces of the UI and trying to figure it out that way.
Can you try checking this code to make sure that your Download tool configuration matches with the header and payload values? Most of the time I see that people have missed a header like Content-Type.
Hi Brandon,
I have tried exploring on the Postman Code also which helped me to resolve other errors like content-type, Multipart Boundaries etc.
However post resolving these errors i am stuck on 400 Bad Request. I am sharing the curl Command for your reference:
I feel like there i am missing something to Post FormData+File at once through the download tool. if there would have been no file involved then it would have been a success for me.
I think that the trick here is leveraging the blob tools as described in this post: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/RESTful-API-using-POST-to-upload-a-fil...
"the key to getting this to work was using the blob input tool followed immediately by a blob convert to change the blob field to a base64 encoded string."
If you leverage these two tools to get your file into a base64 encoded string that you can then pass the file column dynamically into the download tool. Have you tried base64 encoding the blob or just sending it up as a blob?
This part of your code
Regarding your question on the other discussion for Upload both File and Data using HTTP Post function in Download Tool
I am using the python script provided in this solution instead of download tool