HTTP Form Configuration
To enable the Form feature, the compile-time configuration HTTPs_CFG_FORM_EN
must be set accordingly (See section Module Configuration).
Also a configuration object (HTTPs_FORM_CFG
) MUST be added to the HTTP Instance configuration (See section Parameters Configuration).
For more information on HTTP Form Submission, see section Form.
Form Configuration Structure
const HTTPs_FORM_CFG HTTPs_FormCfg = { 15, /* .NbrPerConnMax */ 20, /* .KeyLenMax */ 20, /* .ValLenMax */ DEF_ENABLED, /* .MultipartEn */ DEF_ENABLED, /* .MultipartFileUploadEn */ DEF_ENABLED, /* .MultipartFileUploadOverWrEn */ "\\" /* .MultipartFileUploadFolderPtr */ };
Fields Description
Structure Field | Type | Description | Possible Values |
---|---|---|---|
NbrPerConnMax | CPU_INT16U | Maximum number of Form fields accepted for each HTTP request. Number must be greater than or equal to the maximum number of input fields which can be transmitted inside a received HTML form. | SHOULD be >= 1 |
KeyLenMax | CPU_INT16U | Maximum length of the key part accepted by the HTTP server. | SHOULD be >= 1 |
ValLenMax | CPU_INT16U | Maximum length of the value part accepted by the HTTP server. | SHOULD be >= 1 |
MultipartEn | CPU_BOOLEAN | Enable/Disable Multipart Form support. | DEF_ENABLED or DEF_DISABLED |
MultipartFileUploadEn | CPU_BOOLEAN | Enable/Disable File Upload feature inside Multipart Form. If File Upload feature is enabled, the web server will store the file received. If the feature is not enabled and a file is received the file will be simply dropped. | DEF_ENABLED or DEF_DISABLED |
MultipartFileUploadOverWrEn | CPU_BOOLEAN | Enable/Disable File overwrite when file is upload to server. File overwrite must be enabled to allow a file to be received if the file already exist in the folder. | DEF_ENABLED or DEF_DISABLED |
MultipartFileUploadFolderPtr | CPU_CHAR * | Configuration the folder where the uploaded files will be stored. A folder name need to be specified to indicate where the uploaded files will be save. | SHOULD be a string pointer |