Delete File From Server

Delete File From Server

Kuika's Delete File From Server action is used to delete files stored on the server. With this action, users can easily remove unnecessary or old files from the application and manage server space efficiently.

Technical Features

  • Server File Deletion: Ensures that a specific file is securely removed from the server.
  • Deletion by File Path or ID: Files can be deleted using either the directory path (File Path) or a unique identifier (File ID).
  • Web & Mobile App Support: The action works on both web and mobile applications.
  • Simple and Secure: The secure file deletion process is triggered by user interaction.
Delete File From Server Action Application Steps

1. Define the Action in UI Design

  • Open your project on the Kuika platform.
  • Go to the UI Design module and select the screen where the deletion will take place.
  • Create a button such as ‘Delete File’.
  • Select the button and add the Device > Delete File From Server action from the + ADD ACTION menu according to the desired trigger event (Initial Actions, OnClick, OnBlur, etc.).

2. Configuring Action Parameters

  • File ID: The unique identifier of the file to be deleted.
  • These values can be taken from sources such as Fixed, Form Component, Action Result, Current, and can be linked with the Symbol Picker.
  • Click the SAVE button to complete the process.
Usage Scenario: Deleting a File Uploaded by the User

This action is triggered when a user wants to delete a PDF file that they previously uploaded to the system. This allows the user to remove the file from the application interface.

Adding a User File Deletion Action

  • Enter the UI Design module and add a Button element from the Elements panel on the left side.
  • In the Properties panel, enter text such as ‘Delete File’ in the Label field of the button.
  • Select the button and add the OnClick → Device → Delete File From Server action from the + ADD ACTION menu.

Configuring the Delete File From Server Action

  • File ID: reportFileId (The ID obtained when the file is uploaded, which can be retrieved from an Action Result, for example.)

With this configuration, when the user clicks the button, the file is completely deleted from the system and free space is created on the server.

Advanced Customisations for the Delete File From Server Action

Dynamic Deletion Process

  • User-specific file paths or file IDs can be determined dynamically.
  • For example, they can be assigned as parameters based on user selection or the file ID from the data source.
  • This allows each user to delete their own files or the files associated with their records.

Confirmed Deletion Process

This can be done in the application as follows:

When the ‘Delete File’ button is clicked, a modal, alert or confirmation dialog box opens first.If the user clicks “Yes”, the Delete File From Server action is triggered; if they click ‘No’, the process is cancelled.

  • This prevents accidental file deletion.

Post-Deletion Notification

  • When the deletion process is successfully completed, a visual notification can be displayed to the user.
  • These feedback messages improve the user experience and clearly indicate the status of the process.

Multiple File Deletion

  • If multiple files need to be deleted:
    • The same action can be triggered separately for multiple file IDs.
    • For example, file IDs are retrieved in a list, and the Delete File From Server action is run for each file in the list using a loop.
    • Alternatively, if batch deletion support is available in the backend, the batch deletion action can also be used.

Technical Risks

  • Invalid File Path: If the file path is incorrect, the file cannot be deleted. The directory must be defined correctly and configured via Configuration Manager.
  • Unauthorised Access: If the user does not have delete permissions, the operation should be blocked. Authorisation is recommended.
  • Server Delay: The file deletion process may take some time. Visual feedback about the process should be provided to the user.

The Delete File From Server action is a practical solution for file cleaning, user content management, and server optimisation in Kuika applications. With its advanced configuration and broad platform compatibility, it improves the user experience and provides ease of control for system administrators.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar