• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Building Questions
S

Saul Macht

started a topic over 5 years ago
Answered

How can I upload a file to Amazon S3 and download it?

I am currently trying to upload a file to Amazon S3 and download it. However, I have been relatively unsuccessful at downloading the file I previously uploaded due to constant internal errors. How should I go about solving this issue?


Best Answer
B
Bryan Yap said over 5 years ago

Hi Saul, the reason why you are getting those errors is that Workato's S3 connector is unable to correctly decode the file data coming back from S3 because it expects UTF-8 encoded data and not binary to be returned. I'm pretty sure that those internal errors which you find would disappear if you upload text based, .txt files instead. However, if you would still like to upload binary files, there is a workaround which involves encoding the binary file as base64 first.


I've created a recipe which shows this process at https://www.workato.com/recipes/617689-upload-and-download-image-from-s3#recipe.


I've also attached a screenshot below which shows the base64 encoding function being used in the recipe to encode the binary file.


image




Answer

Bryan Yap

said over 5 years ago

Hi Saul, the reason why you are getting those errors is that Workato's S3 connector is unable to correctly decode the file data coming back from S3 because it expects UTF-8 encoded data and not binary to be returned. I'm pretty sure that those internal errors which you find would disappear if you upload text based, .txt files instead. However, if you would still like to upload binary files, there is a workaround which involves encoding the binary file as base64 first.


I've created a recipe which shows this process at https://www.workato.com/recipes/617689-upload-and-download-image-from-s3#recipe.


I've also attached a screenshot below which shows the base64 encoding function being used in the recipe to encode the binary file.


image




Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count