In order to upload a file by the custom uploader, it is necessary to register it to the custom Web page beforehand. To register a custom uploader, specify the custom uploader class for the template argument and use the [AutoConnectAux::onUpload](apiaux.md#onupload) function.
In order to upload a file by the custom uploader, it is necessary to register it to the custom Web page beforehand. To register a custom uploader, specify the custom uploader class name in the template argument of the [AutoConnectAux::onUpload](apiaux.md#onupload) function and invokes it.
The rough structure of the sketches that completed these implementations will be as follows:
@ -57,7 +57,7 @@ Run the AutoConnect site using the externally ensured ESP8266WebServer for ESP82
The [**handleClient**](api.md#handleclient) function of AutoConnect can include the response of the URI handler added by the user using the "*on*" function of ESP8266WebServer/WebServer. If ESP8266WebServer/WebServer is assigned internally by AutoConnect, the sketch can obtain that reference with the [**host**](api.md#host) function.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">webServer</span><spanclass="apidesc">A reference of ESP8266WebServer or WebServer instance.</span></dd>
Process the AutoConnect menu interface. The handleClient() function of the ESP8266WebServer/WebServer hosted by AutoConnect is also called from within AutoConnect, and the client request handlers contained in the user sketch are also handled.
@ -143,7 +143,7 @@ Process the AutoConnect menu interface. The handleClient() function of the ESP82
Join the AutoConnectAux object to AutoConnect. AutoConnectAux objects can be joined one by one, or joined altogether. The AutoConnectAux object joined by the join function can be handled from the AutoConnect menu.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">aux</span><spanclass="apidesc">Reference to AutoConnectAux. It can be std::vector of std::reference_wrapper of AutoConnectAux with [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization).</span></dd>
</dl>
@ -221,7 +221,7 @@ bool load(Stream& aux)
```
Load JSON document of AutoConnectAux which contains AutoConnectElements. If there is a syntax error in the JSON document, false is returned.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">aux</span><spanclass="apidesc">The input string to be loaded.</span></dd>
<dt>**Return value**</dt>
<dd><spanclass="apidef">true</span><spanclass="apidesc">The JSON document as AutoConnectAux successfully loaded.</span></dd>
Returns a reference to the element specified by **name**. An operator `[]` is a shortcut for [getElement](apiaux.md#getelement) function with the reference casting. Unlike getElement, which returns a pointer to that element, an operator `[]` returns a reference to that element. You also need to cast the return value to the actual type, just like the getElement function.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Name of the AutoConnectElements to be retrieved.</span></dd>
<dt>**Return value**</dt><dd>A reference to AutoConnectElement. It is different from the actual element type.</dd>
</dl>
@ -94,7 +94,7 @@ bool load(Stream& in)
```
Load all AutoConnectElements elements from JSON document into AutoConnectAux as custom Web pages. The JSON document specified by the load function must be the [document structure](acjson.md#json-objects-elements-for-the-custom-web-page) of AutoConnectAux. Its JSON document can describe multiple pages as an array.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">in</span><spanclass="apidesc">Specifies the JSON document to be load. The load function can input the following objects.
- String : Read-only String
@ -159,7 +159,7 @@ void menu(const bool post)
```
Set or reset the display as menu item for this AutoConnectAux. This function programmatically manipulates the menu parameter of the [AutoConenctAux constructor](apiaux.md#autoconnectaux).
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">true</span><spanclass="apidesc">Show on the menu.</span></dd>
<dd><spanclass="apidef">false</span><spanclass="apidesc">Hidden on the menu.</span></dd>
Release a specified AutoConnectElement from AutoConenctAux. The release function is provided to dynamically change the structure of the custom Web pages with the sketch. By combining the release function and the [add](apiaux.md#add) function or the [loadElement](apiaux.md#loadelement) function, the sketch can change the style of the custom Web page according to its behavior.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Specifies the name of AutoConnectElements to be released.</span></dd>
Casts the reference to the AutoConnectElement the specified type.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">T</span><spanclass="apidesc">The element type. AutoConnectElements type such as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).</span></dd>
<dt>**Return value**</dt>
<dd>A reference to the AutoConnectElement with actual type.</dd>
@ -421,7 +421,7 @@ void add(const String& value)
```
Adds an option for the radio button.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">value</span><spanclass="apidesc">An option string to add to the radio button.</span></dd>
Indicates the check of the specified option for the radio buttons. You can use the **check** function for checking dynamically with arbitrary of the radio button.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">value</span><spanclass="apidesc">An option string to be checked.</span></dd>
Clear the array of option strings that AutoConnectRadio has in the values. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">reserve</span><spanclass="apidesc">Reserved size of a container for the radio button option strings.</span></dd>
Clear the array of options list that AutoConnectSelect has in the options. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><spanclass="apidef">reserve</span><spanclass="apidesc">Reserved size of a container for the options.</span></dd>