Delete Files

When removing items from the database that have associated files stored on disk, you must implement logic that allows the related files to be deleted simultaneously.

In order to create such a page, perform the following steps:

  1. Create a page on which you add a delete transaction that removes a record from the table. This table should be the one which has a field related to files on disk.

  2. Add the server behavior from the Application panel, Server Behaviors -> + -> MX Kollection -> File Upload -> Delete File. This action will only take place after the delete operation on the table. If the delete operation is not successful, the file will not be deleted either.

  3. The Transaction Engine will attempt to remove the file; if an error occurs, a rollback will be executed on the delete operation, so that no data will be lost.

This section contains the following topics: