_Upload_File(...)
Purpose: Handles file uploads within forms, often those automatically generated.
Syntax: __Upload_File(MaxFileSizeBytes, Accepted_File_Types, TargetFolderName, TargetFileName, File_Caption)
Parameters:
MaxFileSizeBytes
:
Maximum allowed file size.
Accepted_File_Types
:
Comma-separated list of allowed extensions (e.g., "pdf,doc,xls").
TargetFolderName
:
Server folder where the file will be stored.
TargetFileName
:
Base file name (unique identifiers likely get added)
File_Caption
:
Optional title.
Notes:
Relies
on a PHP script (Upload_php.php
)
for processing.
Assumes
a database table with a unique ID ([Id]
)
in the Cmp_Id
variable
_Upload_File_Start
Purpose:
Initiates the definition of an _Upload_File
configuration.
Syntax: __Upload_File_Start
_Upload_File_End
Purpose:
Completes the definition of an _Upload_File
configuration.
Syntax: __Upload_File_End
Image Uploads
_Upload_Image(...)
Purpose: Handles image uploads, with options for resizing and format conversion.
Syntax: __Upload_Image(MaxFileSizeBytes, Accepted_File_Types, TargetFolderName, TargetFileName, TargetFileType, TargetMaxImageWidth, TargetMaxImageHeight, Image_Process, Image_Caption)
Parameters:
Image_Process
:
Controls image manipulation
0: Resize to fit within max width/height.
1: Resize to exact width/height (might distort).
2: Convert format only.
(See
other parameters under _Upload_File
– they have similar meanings)
Notes:
Also
relies on Upload_php.php
Assumes
a database table with a unique ID ([Id]
)
in the Cmp_Id
variable
_Upload_Image_Start
Purpose:
Initiates the definition of an _Upload_Image
configuration.
Syntax: __Upload_Image_Start
_Upload_Image_End
Purpose:
Completes the definition of an _Upload_Image
configuration.
Syntax: __Upload_Image_End
Important Considerations
PHP Integration: Both upload commands work in conjunction with a PHP script to handle the actual file transfer and any necessary image processing.
Database
Tie-in:
These commands seem to be designed for systems where uploaded files
are linked to database records using a unique ID stored in the
Cmp_Id
variable.