Required
project| Type: | Project |
| Description: | The project. |
class AttachmentComponent(builtins.object):
def __init__(self, project: Project, path: pathlib.Path): ...| Type: | Project |
| Description: | The project. |
| Type: | pathlib.Path |
| Description: | Path to the attachment folder. |
def add(
self,
name: str,
content: bytes | str | dict,
overwrite: bool = False,
description: str | None = None,
) -> None: ...| Type: | str |
| Description: | Name of the file. |
| Type: | bytes | str | dict |
| Description: | Content of the file. |
| Type: | bool |
| Default value: | False |
| Description: | Whether to overwrite the file if it already exists. |
| Type: | str | None |
| Default value: | None |
| Description: | An optional description of the file. |
def delete(self, name: str) -> None: ...| Type: | str |
| Description: | Name of the attachment to delete. |
def detail_list(self) -> builtins.list[dict]: ...def get_content(self, name: str) -> bytes: ...| Type: | str |
| Description: | Name of the attachment. |
def get_content_dict(self, name: str) -> dict: ...| Type: | str |
| Description: | Name of the attachment. |
def get_content_str(self, name: str) -> str: ...| Type: | str |
| Description: | Name of the attachment. |
def get_details(self, name: str) -> dict: ...| Type: | str |
| Description: | Name of the attachment. |
def list(self) -> builtins.list[str]: ...