<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to send a file to AWS S3 via Content Loader Functions in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/1049709#M71090</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you send the exact configuration which you used.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2026 09:17:50 GMT</pubDate>
    <dc:creator>SM_14096490</dc:creator>
    <dc:date>2026-01-05T09:17:50Z</dc:date>
    <item>
      <title>How to send a file to AWS S3 via Content Loader Functions</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737234#M53115</link>
      <description>&lt;P&gt;I am trying to send a file to an AWS S3 bucket via an API call.&amp;nbsp; I am able to send the file when I use Postman, but I am unable to send it via Content Loader Functions.&amp;nbsp; I am assuming my configurations may be incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I send the file through Postman, I do the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;select PUT as the method&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-family: inherit;"&gt;paste the URL into the request URL (this automatically populates the parameters under Params tab)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-family: inherit;"&gt;under the binary tab, select binary and the file to upload&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-family: inherit;"&gt;click on the Send button&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;The following is my service to send the file via Content Loader Functions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;// 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&amp;amp;Content-Type=text%2Fcsv&amp;amp;Expires=1625693809&amp;amp;Signature=nmDoq8o6NgidN1hUo583A72Nxi4%3D&amp;amp;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 */
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run this service, I get a blob output, but the file is not received in the S3 bucket.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 21:56:04 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737234#M53115</guid>
      <dc:creator>Willie</dc:creator>
      <dc:date>2021-07-07T21:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a file to AWS S3 via Content Loader Functions</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737342#M53132</link>
      <description>&lt;P&gt;Haven't done it myself and can't check atm, but I'd try to add headers (set the appropriate type there)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var headers = { 'Content-Type': 'application/json'};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and change&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;headers: undefined /* JSON */&lt;/EM&gt;&lt;/STRONG&gt; to&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;headers: headers /* JSON */&lt;/EM&gt;&lt;/STRONG&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, what http response are you getting / what's is returned in&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;result["result"]&lt;/EM&gt;&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing... While passing auth data in the URL seem to work, I'd consider using authorization headers for passing&amp;nbsp;AWSAccessKeyId. You definitely have see this, but, just in case, there are some examples of using POST on Amazon&amp;nbsp;&lt;A href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/HTTPPOSTExamples.html" target="_blank"&gt;https://docs.aws.amazon.com/AmazonS3/latest/userguide/HTTPPOSTExamples.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 13:55:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737342#M53132</guid>
      <dc:creator>DmitryTsarev</dc:creator>
      <dc:date>2021-07-08T13:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a file to AWS S3 via Content Loader Functions</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737375#M53139</link>
      <description>&lt;P&gt;I was able to get it to work after setting headers to the following:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{ 'Content-Type': 'text/csv'},&lt;/LI-CODE&gt;
&lt;P&gt;Thank you!&amp;nbsp; &amp;nbsp;In my case, it's 'text/csv' as that is the file type I am uploading.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 15:44:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/737375#M53139</guid>
      <dc:creator>Willie</dc:creator>
      <dc:date>2021-07-08T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a file to AWS S3 via Content Loader Functions</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/1049709#M71090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you send the exact configuration which you used.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 09:17:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-send-a-file-to-AWS-S3-via-Content-Loader-Functions/m-p/1049709#M71090</guid>
      <dc:creator>SM_14096490</dc:creator>
      <dc:date>2026-01-05T09:17:50Z</dc:date>
    </item>
  </channel>
</rss>

