(filename: str, disptype: str = "form-data; name=\"file\"")
return {'Content-Disposition': disp}
Returns a dict containing the MIME content-disposition header for a file.

	.. code-block:: python

		>>> content_disposition_headers('example.txt')
		{'Content-Disposition': 'form-data; filename="example.txt"'}

		>>> content_disposition_headers('example.txt', 'attachment')
		{'Content-Disposition': 'attachment; filename="example.txt"'}

	Parameters
	----------
	filename : str
		Filename to retrieve the MIME content-disposition for
	disptype : str
		Rhe disposition type to use for the file
Returns a dict containing the MIME content-disposition header for a file.
Returns a dict containing the MIME content - disposition header for a file .
def content_disposition_headers(filename: str, disptype: str = "form-data; name=\"file\"") \
    -> ty.Dict[str, str]:
	"""Returns a dict containing the MIME content-disposition header for a file.

	.. code-block:: python

		>>> content_disposition_headers('example.txt')
		{'Content-Disposition': 'form-data; filename="example.txt"'}

		>>> content_disposition_headers('example.txt', 'attachment')
		{'Content-Disposition': 'attachment; filename="example.txt"'}

	Parameters
	----------
	filename : str
		Filename to retrieve the MIME content-disposition for
	disptype : str
		Rhe disposition type to use for the file
	"""
	disp = '{0}; filename="{1}"'.format(
		disptype,
		urllib.parse.quote(filename, safe='')
	)
	return {'Content-Disposition': disp}
def content_disposition_headers ( filename : str , disptype : str = "form-data; name=\"file\"" ) -> ty . Dict [ str , str ] : disp = '{0}; filename="{1}"' . format ( disptype , urllib . parse . quote ( filename , safe = '' ) ) return { 'Content-Disposition' : disp }