anchor.diff:  		<cfset stringToSign = arrayToList( stringToSignParts, chr( 10 ) ) />
   		<cfset signature = binaryEncode(
   			binaryDecode(
  -				hmac( stringToSign, d.s3_secretKey, "HmacSHA1", "utf-8" ),
  +				hmac( stringToSign, s3.s3_secretKey, "HmacSHA1", "utf-8" ),
   				"hex"
   			),
   			"base64"
   		)>
  -		<cfhttp result="put"  method="put" url="#d.s3_endpoint#/#bucket#/#fileName#">
  -			<cfhttpparam type="header" name="Authorization" value="AWS #d.s3_accesskey#:#signature#"/>
  +		<cfhttp result="putfile" method="put" url="#s3.s3_endpoint#/#bucket#/#fileName#">
  +			<cfhttpparam type="header" name="Authorization" value="AWS #s3.s3_accesskey#:#signature#"/>
   		    <cfhttpparam type="header" name="Content-Length" value="#contentLength#" />
   		    <cfhttpparam type="header" name="Content-Type" value="#contentType#"/>
   		    <cfhttpparam type="header" name="Date" value="#currentTime#" />
  
positive.code: 		<cfset stringToSign = arrayToList( stringToSignParts, chr( 10 ) ) />
  		<cfset signature = binaryEncode(
  			binaryDecode(
  				hmac( stringToSign, d.s3_secretKey, "HmacSHA1", "utf-8" ),
  				"hex"
  			),
  			"base64"
  		)>
  		<cfhttp result="mkunamebkt"  method="put" url="#d.s3_endpoint#/#bucket#">
  			<cfhttpparam type="header" name="Authorization" value="AWS #d.s3_accesskey#:#signature#"/>
  		    <cfhttpparam type="header" name="Content-Type" value="#contentType#" />
  		    <cfhttpparam type="header" name="Date" value="#currentTime#" />
  		</cfhttp>
  
negative.code: 			    "/" & bucket & "/" & tfilename
  			] />
  			<cfset stringToSign = arrayToList( stringToSignParts, chr( 10 ) ) />
  			<cfset signature = binaryEncode(
  				binaryDecode(
  					hmac( stringToSign, s3.s3_secretKey, "HmacSHA1", "utf-8" ),
  					"hex"
  				),
  				"base64"
  			)>
  			<cfhttp result="putTN" method="put" url="#s3.s3_endpoint#/#bucket#/#tfilename#">
  				<cfhttpparam type="header" name="Authorization" value="AWS #s3.s3_accesskey#:#signature#"/>
  			    <cfhttpparam type="header" name="Content-Length"  value="#contentLength#" />
  			    <cfhttpparam type="header" name="Content-Type"  value="#contentType#" />
  			    <cfhttpparam type="header" name="Date" value="#currentTime#" />
  			    <cfhttpparam type="body" value="#content#" />
  			</cfhttp>
  			<cfset r.preview_uri = "https://web.corral.tacc.utexas.edu/arctos-s3/#bucket#/#tfilename#">
  		<cfelse>
  			<cfset r.preview_uri="">
  		</cfif>
  		<!--- statuscode of putting the actual file - the important thing--->
  	    <cfset r.statusCode=putfile.statusCode>
  		<cfset r.filename="#fileName#">
  		<cfset r.mime_type=mimetype>
  		<cfset r.media_uri="#media_uri#">
  
  			<cfcatch>
  				<cfset r.statusCode=400>
  				<cfset r.msg=cfcatch.message & '; ' & cfcatch.detail>
  			</cfcatch>
  	</cftry>
  	<cfreturn serializeJSON(r)>
  </cffunction>
  