ShareFile
Represents a file to share, either from disk or in-memory bytes.
Properties
-
data(Optional[bytes]) –Raw bytes of the file to share.
-
mime_type(Optional[str]) –MIME type of the file.
-
name(Optional[str]) –Optional name of the file.
-
path(Optional[str]) –Filesystem path to the file to share.
Methods
-
from_bytes–Create ShareFile from raw bytes.
-
from_path–Create ShareFile from a filesystem path.
Properties#
data: Optional[bytes] = None
class-attribute
instance-attribute
#
Raw bytes of the file to share.
mime_type: Optional[str] = None
class-attribute
instance-attribute
#
MIME type of the file.
name: Optional[str] = None
class-attribute
instance-attribute
#
Optional name of the file.
path: Optional[str] = None
class-attribute
instance-attribute
#
Filesystem path to the file to share.