예제 #1
0
    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()
예제 #2
0
    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()
예제 #3
0
    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()
예제 #4
0
    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()
예제 #5
0
    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()
예제 #6
0
    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()
예제 #7
0
 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()
예제 #8
0
 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()