def get_boundary(self, failobj=None): missing = object() boundary = self.get_param('boundary', missing) if boundary is missing: return failobj return Utils.collapse_rfc2231_value(boundary).rstrip()
def get_filename(self, failobj=None): missing = object() filename = self.get_param('filename', missing, 'content-disposition') if filename is missing: return failobj return Utils.collapse_rfc2231_value(filename).strip()
def get_filename(self, failobj=None): """Return the filename associated with the payload if present. The filename is extracted from the Content-Disposition header's `filename' parameter, and it is unquoted. """ missing = object() filename = self.get_param('filename', missing, 'content-disposition') if filename is missing: return failobj return Utils.collapse_rfc2231_value(filename).strip()
def get_boundary(self, failobj=None): """Return the boundary associated with the payload if present. The boundary is extracted from the Content-Type header's `boundary' parameter, and it is unquoted. """ missing = object() boundary = self.get_param('boundary', missing) if boundary is missing: return failobj # RFC 2046 says that boundaries may begin but not end in w/s return Utils.collapse_rfc2231_value(boundary).rstrip()
def get_boundary(self, failobj = None): missing = object() boundary = self.get_param('boundary', missing) if boundary is missing: return failobj return Utils.collapse_rfc2231_value(boundary).rstrip()
def get_filename(self, failobj = None): missing = object() filename = self.get_param('filename', missing, 'content-disposition') if filename is missing: return failobj return Utils.collapse_rfc2231_value(filename).strip()