MCPcopy Index your code
hub / github.com/python/cpython / get_content_disposition

Method get_content_disposition

Lib/email/message.py:973–983  ·  view source on GitHub ↗

Return the message's content-disposition if it exists, or None. The return values can be either 'inline', 'attachment' or None according to the rfc2183.

(self)

Source from the content-addressed store, hash-verified

971 return [part.get_content_charset(failobj) for part in self.walk()]
972
973 def get_content_disposition(self):
974 """Return the message's content-disposition if it exists, or None.
975
976 The return values can be either 'inline', 'attachment' or None
977 according to the rfc2183.
978 """
979 value = self.get('content-disposition')
980 if value is None:
981 return None
982 c_d = _splitparam(value)[0].lower()
983 return c_d
984
985 # I.e. def walk(self): ...
986 from email.iterators import walk

Callers 1

Calls 3

getMethod · 0.95
_splitparamFunction · 0.85
lowerMethod · 0.45

Tested by 1