Set the Content-Type field in the form. Do not append it to the data. If appended S3 will either reject the upload with a policy violation on $content-type, or will accept the upload and ignore the content-type, defaulting to "application/octet-stream".