INTEGRAL DSL Reference Guide
Jump directly to:
::my.app.GetPostVar_FileName(string, default_val = "")
This function returns the file name associated with the requested POST variable.
Parameters
string
A string containing the name of the POST variable whose file name is to be returned.
default_val
A string containing the default file name.
Return Value
The function returns a string containing the file name of the requested variable, if that variable is found in the POST payload and its input type is “file”. If the variable is not found in the POST payload, its input type is not “file”, or the payload is not in “multipart/form-data” format, the function returns default_val.
Note
This function is intended to handle web form submissions that are in “multipart/form-data” format. While it's not illegal to call this function in other contexts, doing so will only return default_val.
Example 1
local image_file_type = ::my.app.GetPostVar_FileName("bin_image_file", "integral_logo.png");