     store. While this resource address looks like a file path, it is
     a single key.
 --->
-<cfset bucket="testing.mctesty">
-<cfset resource = "Arctos-generic-header.png" />
-
-<cfset currentTime = getHttpTimeString( now() ) />
-
-
-
-
-
-<cfset contentType = "image/png" />
-
-<cfset contentLength=arrayLen( content )>
-
-
-<cfset stringToSignParts = [
-    "PUT",
-    "",
-    contentType,
-    currentTime,
-    "/" & bucket & "/" & resource
-] />
+
+
 
 
 <br>stringToSignParts: <cfdump var=#stringToSignParts#>



<!--- Collapse the parts into a newline-delimited list. --->
<cfset stringToSign = arrayToList( stringToSignParts, chr( 10 ) ) />

<br>stringToSign: #stringToSign#




<cfif action is "putfile">
	<cfset content = fileReadBinary( expandPath( "/images/Arctos-generic-header.png" ) ) />
	<cfset bucket="testing.mctesty/subtester">
	<cfset resource = "Arctos-generic-header.png" />
	<cfset currentTime = getHttpTimeString( now() ) />
	<cfset contentType = "image/png" />
	<cfset contentLength=arrayLen( content )>

	<cfset stringToSignParts = [
	    "PUT",
	    "",
	    contentType,
	    currentTime,
	    "/" & bucket & "/" & resource
	] />

	<cfset stringToSign = arrayToList( stringToSignParts, chr( 10 ) ) />

	<cfset signature = binaryEncode(
			binaryDecode(
				hmac( stringToSign, d.s3_secretKey, "HmacSHA1", "utf-8" ),
				"hex"
			),
			"base64"
		)>


	<cfhttp
	    result="put"
	    method="put"
	    url="#d.s3_endpoint#/testing.mctesty/#resource#">

		<cfhttpparam
	        type="header"
	        name="Authorization"
	        value="AWS #d.s3_accesskey#:#signature#"
		/>




	    <cfhttpparam
	        type="header"
	        name="Content-Length"
	        value="#contentLength#"
	        />

	    <cfhttpparam
	        type="header"
	        name="Content-Length"
	        value="#arrayLen( content )#"
	        />

	    <cfhttpparam
	        type="header"
	        name="Content-Type"
	        value="#contentType#"
	        />

	    <cfhttpparam
	        type="header"
	        name="Date"
	        value="#currentTime#"
	        />

	    <cfhttpparam
	        type="body"
	        value="#content#"
	        />
	</cfhttp>
</cfif>


