Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.file_upload Namespace Reference

Classes

class  FileUploadData
 
class  FileUploadView
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 
Iterator[Path] process_uploaded_file (HomeAssistant hass, str file_id)
 

Variables

 CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
 
string DOMAIN = "file_upload"
 
int MAX_SIZE = 100 * ONE_MEGABYTE
 
int ONE_MEGABYTE = 1024 * 1024
 
string TEMP_DIR_NAME = f"home-assistant-{DOMAIN}"
 

Detailed Description

The File Upload integration.

Function Documentation

◆ async_setup()

bool homeassistant.components.file_upload.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up File Upload.

Definition at line 56 of file __init__.py.

◆ process_uploaded_file()

Iterator[Path] homeassistant.components.file_upload.process_uploaded_file ( HomeAssistant  hass,
str  file_id 
)
Get an uploaded file.

File is removed at the end of the context.

Definition at line 36 of file __init__.py.

Variable Documentation

◆ CONFIG_SCHEMA

homeassistant.components.file_upload.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)

Definition at line 32 of file __init__.py.

◆ DOMAIN

string homeassistant.components.file_upload.DOMAIN = "file_upload"

Definition at line 26 of file __init__.py.

◆ MAX_SIZE

int homeassistant.components.file_upload.MAX_SIZE = 100 * ONE_MEGABYTE

Definition at line 29 of file __init__.py.

◆ ONE_MEGABYTE

int homeassistant.components.file_upload.ONE_MEGABYTE = 1024 * 1024

Definition at line 28 of file __init__.py.

◆ TEMP_DIR_NAME

string homeassistant.components.file_upload.TEMP_DIR_NAME = f"home-assistant-{DOMAIN}"

Definition at line 30 of file __init__.py.