def build_post_form_args(self, bucket_name, key, expires_in = 6000,
                             acl = None, success_action_redirect = None,
                             max_content_length = None,
                             http_method = "http", fields=None,
                             conditions=None):
        """
        Taken from the AWS book Python examples and modified for use with boto
        This only returns the arguments required for the post form, not the
        actual form.  This does not return the file input field which also
        needs to be added
        
        :type bucket_name: string 
        :param bucket_name: Bucket to submit to
        
        :type key: string
        :param key:  Key name, optionally add ${filename} to the end to
            attach the submitted filename
        
        :type expires_in: integer
        :param expires_in: Time (in seconds) before this expires, defaults
            to 6000
        
        :type acl: :class:`boto.s3.acl.ACL`
        :param acl: ACL rule to use, if any
        
        :type success_action_redirect: string 
        :param success_action_redirect: URL to redirect to on success
        
        :type max_content_length: integer 
        :param max_content_length: Maximum size for this file
        
        :type http_method: string
        :param http_method:  HTTP Method to use, "http" or "https"
        
        :rtype: dict
        :return: A dictionary containing field names/values as well as
            a url to POST to
        
            .. code-block:: python
            
                {
                    "action": action_url_to_post_to, 
                    "fields": [ 
                        {
                            "name": field_name, 
                            "value":  field_value
                        }, 
                        {
                            "name": field_name2, 
                            "value": field_value2
                        } 
                    ] 
                }
            
        """
        if fields == None:
            fields = []
        if conditions == None:
            conditions = []
        expiration = time.gmtime(int(time.time() + expires_in))

        # Generate policy document
        conditions.append('{"bucket": "%s"}' % bucket_name)
        if key.endswith("${filename}"):
            conditions.append('["starts-with", "$key", "%s"]' % key[:-len("${filename}")])
        else:
            conditions.append('{"key": "%s"}' % key)
        if acl:
            conditions.append('{"acl": "%s"}' % acl)
            fields.append({ "name": "acl", "value": acl})
        if success_action_redirect:
            conditions.append('{"success_action_redirect": "%s"}' % success_action_redirect)
            fields.append({ "name": "success_action_redirect", "value": success_action_redirect})
        if max_content_length:
            conditions.append('["content-length-range", 0, %i]' % max_content_length)
            fields.append({"name":'content-length-range', "value": "0,%i" % max_content_length})

        policy = self.build_post_policy(expiration, conditions)

        # Add the base64-encoded policy document as the 'policy' field
        policy_b64 = base64.b64encode(policy)
        fields.append({"name": "policy", "value": policy_b64})

        # Add the AWS access key as the 'AWSAccessKeyId' field
        fields.append({"name": "AWSAccessKeyId",
                       "value": self.aws_access_key_id})

        # Add signature for encoded policy document as the 'AWSAccessKeyId' field
        signature = self._auth_handler.sign_string(policy_b64)
        fields.append({"name": "signature", "value": signature})
        fields.append({"name": "key", "value": key})

        # HTTPS protocol will be used if the secure HTTP option is enabled.
        url = '%s://%s/' % (http_method,
                            self.calling_format.build_host(self.server_name(),
                                                           bucket_name))

        return {"action": url, "fields": fields}