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
about 7 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 also attached a screenshot below which shows the base64 encoding function being used in the recipe to encode the binary file.
Answer
Bryan Yap
said
about 7 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.
Saul Macht
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?
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.
Bryan Yap
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.