I'm using the Instructure Canvas API for uploading files. After the initial API call, Canvas returns information that is used to make a POST request to Amazon Web Services's S3 service to upload a file.
Here is the request I'm using to post the file to AWS S3, populated with the data returned by the Canvas API:
<cfhttp url="#aws.upload_url#" result="result" method="post" multipart="yes"> <cfhttpparam type="formfield" name="key" value="#aws.upload_params.key#" /> <cfhttpparam type="formfield" name="acl" value="#aws.upload_params.acl#" /> <cfhttpparam type="formfield" name="Filename" value="#photoName#" /> <cfhttpparam type="formfield" name="AWSAccessKeyId" value="#aws.upload_params.AWSAccessKeyId#" /> <cfhttpparam type="formfield" name="Policy" value="#aws.upload_params.Policy#" /> <cfhttpparam type="formfield" name="Signature" value="#aws.upload_params.Signature#" /> <cfhttpparam type="formfield" name="Content-Type" value="#aws.upload_params['content-type']#" /> <cfhttpparam type="formfield" name="success_action_redirect" value="#aws.upload_params['success_action_redirect']#" /> <cfhttpparam type="file" name="file" file="#fullPath#" /></cfhttp>
This request works on a ColdFusion 9 server (the response returns "200 OK"), but fails on a ColdFusion 10 server (the response returns "500 Internal Server Error"). The Canvas API call works in both cases.
Any ideas or suggestions appreciated.