I am trying to upload a file to S3 using apps script.
I have been trying to use https://github.com/viuinsight/google-apps-script-for-aws
S3.init();
S3.putObject("bucket123", 'Tacofile.txt', content, 'ca-central-1')
- I retrieve a file from Google Workspace, where ‘Tacofile’ is a .txt file
- The file successfully loads to S3
The file, however, somehow gets converted to json? How to keep the file as a csv or is there a way to specify the MIME type somewhere before the upload?
thanks in advance
CB
2
Answers
@theWizEd thanks for pointing me in the right direction! I think I got this to work. I changed my source data so my download was done using:
i changed the section in line 106 below:
to the following
Yes use File.getBlob()
S3.putObject("bucket123", 'Tacofile.txt', content.getBlob(), 'ca-central-1')