How to send a file to AWS S3 via Content Loader Functions
I am trying to send a file to an AWS S3 bucket via an API call. I am able to send the file when I use Postman, but I am unable to send it via Content Loader Functions. I am assuming my configurations may be incorrect.
When I send the file through Postman, I do the following:
- select PUT as the method
- paste the URL into the request URL (this automatically populates the parameters under Params tab)
- under the binary tab, select binary and the file to upload
- click on the Send button
The following is my service to send the file via Content Loader Functions:
// Content: BLOB
var Content = Things["SystemRepository"].LoadBinary({
path: "/directory/subDirectory/someFile.csv" /* STRING */
});
// result: BLOB
var result = Resources["ContentLoaderFunctions"].PutBinary({
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: undefined /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "https://something.s3.amazonaws.com/888_2021-07-07_212149.457_UTC.csv?AWSAccessKeyId=ASIAXRXVK4ZJDEZAJJUX&Content-Type=text%2Fcsv&Expires=1625693809&Signature=nmDoq8o6NgidN1hUo583A72Nxi4%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJHMEUCIQDOPwJ3chYw%2BZAll8k4ZEqrvjQZBmXO1nld4ceraUPKOwIgeCWL5q%2FqLjxAYNjx%2FQEbF3lX2ib%2FhhHGAo1TAgAVevUqlAIIZhAAGgw1MTkxMzE4MTc1NTQiDK0Pq%2FgZhZxIAqJH%2FirxAaBuAJ0N1gMNL2RrTdXp8tO18LzWtjE6oTmjKqCP%2Fh8pY5Qld0zBk86AS15z3S70YiG%2FJ7XXyu6VSyc3rHpwLASoJ1ty%2FIBNIDldtkToG36xCPZAay3d0CEDHpkBRUpXNSEGDkaIncea99TrWnu9fR3jeCITp3u0JqJz%2FBP4WU6OCDmxGzJwgdloRXJsxA5YPKZBS9JRe7M15bhr839NZxWwMs9QDYk1kNkL0%2FicVeR%2FTxt0vXOAJdGFFJib%2FWbVyO9pBHjQp4HHJhzbbR%2FPYECgf%2FBmcDDXNow46uGHuMDyEnGsVfRPY4sM%2Fq2aaFT2rMEw7LWYhwY6mgFFj8ph881sLALSD7PX4wvnm2tGSDhr%2Ffn9vJ%2FtlQZCs8OS5mfzXgc7bEpupHXewZYDWEs3ro3uyFVvitA6JLibTsCj680yJzylbIuC8%2BjIvyRBbiy8Z9V6K2JRUCZEPSSmuAB%2FjkqYF%2Bx8Vrmn7vNJr3IafR10nEK5c2Aj%2Fgzr7VuWnKumd0PQTT2qZlOmSwS%2F6Y359gAVptF4" /* STRING */,
content: Content /* BLOB */,
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
});
When I run this service, I get a blob output, but the file is not received in the S3 bucket.

