The purpose of this user interface is to add application logic that deletes files related to a database record.
To delete a file, you must first have a page that uploads files to the server when inserting fields into the database. To learn how to add such functionality, see the Upload Files section.
Access the trigger from the Application panel, Server Behaviors -> + -> MX Kollection -> File Upload -> Delete File. The user interface that opens is divided into two tabs. Configure them as shown below.The three buttons in the top right corner of the
interface offer you the next functionality:
· Click OK when you are done configuring the trigger.
· Click Cancel to exit without applying the new settings.
· The Help button opens this help page.
These buttons are common to both tabs of the Delete
File
For instructions on completing this step, see the Advanced tab. For the Delete File trigger, by default the Priority is set to 98 (since the trigger works with files, it should execute among the last) and the Type is AFTER, as it should execute after the transaction was completed.
The server behavior added this way can be edited later by double-clicking its name in the Server Behaviors tab of the Application panel.
If the file to delete is actually an image, the program tries to locate
any existing thumbnails, and if any are found, it also deletes them.