Ejemplo n.º 1
0
 def __init__(self, stream=None, filename=None, name=None,
              content_type='application/octet-stream', content_length=-1,
              headers=None):
     FileStorage.__init__(self, stream, filename, name=name,
         content_type=content_type, content_length=content_length,
         headers=None)
     self.saved = None
Ejemplo n.º 2
0
 def __init__(self, url, filename=None, name=None):
     data, content_type = parse_data_url(url)
     stream = io.BytesIO(data)
     FileStorage.__init__(self,
                          stream=stream,
                          filename=filename,
                          content_type=content_type,
                          content_length=len(data))
Ejemplo n.º 3
0
 def __init__(self,
              stream: Optional[IO[bytes]] = None,
              filename: Optional[str] = None,
              name: Optional[str] = None,
              content_type: str = 'application/octet-stream',
              content_length: int = -1,
              headers: Optional[Any] = None) -> None:
     FileStorage.__init__(self,
                          stream,
                          filename,
                          name=name,
                          content_type=content_type,
                          content_length=content_length,
                          headers=None)
     self.saved = None  # type: Optional[str]