User Manual

Download File From Server

14/7/25
Download File From Server

Kuika's Download File From Server action allows you to download files stored on the server to the user's device. With this action, documents, media files, or other data files on the server are saved locally, enabling offline access.

Technical Features

  • Server File Download: Ensures that the specified file is downloaded securely to your device.
  • File Location: Access to the file's full directory path and ID on the server.
  • Web & Mobile App Support: Works with all applications.
  • Simple Integration: Can be easily added to UI elements.

Download 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.
  • Create a button for the file download process (e.g., ‘Download File’).
  • Select the button and add the Device > Download File From Server action from the + ADD ACTION menu according to the desired trigger event (Initial Actions, OnClick, OnBlur, etc.).

3. Configure Action Parameters

  • File Name: Specify the name of the file to be downloaded (e.g., report.pdf). You can enter this value as a fixed value or link it dynamically to form components, action results, or variables using the Symbol Picker.
  • File ID: Enter the unique ID number of the file defined in the system. This ID is usually obtained automatically via ActionResult as a result of the ‘Upload File’ action (ActionResult.UploadFile.fileId).
  • These parameters can be taken from sources such as Fixed, Current, Action Result, Form Component, and can be linked with Symbol Picker.
  • Once the configuration is complete, click the SAVE button.

Use Case: User Downloading a File from the Server

A user wants to download a PDF report stored on the server to their device via the application. When the user clicks the ‘Download File’ button, the Download File From Server action is triggered and the file is securely downloaded to their device.

Adding the Download File From Server Action to the File Download Area

  • Open your project on the Kuika platform.
  • Enter the UI Design module.
  • Add a Button element from the left panel (e.g., ‘Download Report’).
  • Select the button, click the + ADD ACTION menu on the right panel.
  • Select the OnClick → Device → Download File From Server action.

Configuring the Download File From Server Action

  • File Path: /documents/annual_report.pdf (The path of the file to be downloaded on the server.)
  • File ID: file12345 (The unique system ID of the file.) This ID is usually obtained automatically via ActionResult as a result of the ‘Upload File’ action (ActionResult.UploadFile.fileId).

With this configuration, when the user clicks the file download button, the file is saved to the device.

Download File From Server Action Advanced Customisations

  1. Dynamic File Path and ID: Different files can be downloaded dynamically based on the user or situation.
  2. Request Confirmation: Confirmation can be requested from the user before downloading the file.

Steps

Open your project on the

  • Kuika platform and go to the UI Design module.
  • Select the file download button.
  • Add the Device > Download File From Server action from the + ADD ACTION menu.
  • Click on the three dots (⋮) icon in the upper right corner of the action you added.
  • Select the Add Confirmation option from the menu that opens.
  • Write the confirmation message you want to show to the user in the ‘Confirmation Message’ field. For example: ‘Are you sure you want to download the file?’
  • When the button is clicked, this confirmation message will be displayed in a pop-up. If the user clicks ‘Yes,’ the file download will start; if they click ‘No,’ the process will be cancelled.
  • Post-Download Notification: A success message can be displayed to the user when the process is complete.

Configuration in the Navigate Action

  • Add a new action immediately after the Download File From Server action. + Add Action > Navigate
  • To Screen: DownloadSuccessPage (or the name of the screen containing the success message in your project)
  • Open As:
    • Current Page → The page changes completely, or
    • Modal → Opens on top of the current screen (size and closability can be adjusted)
  • Width / Height: (If Modal, e.g., ‘400px’ / ‘200px’)
  • Closable: true (If Modal, the user can close the message)
  • Execute Page Init Actions After Closed: True or false as needed
  • Page Content Example (DownloadSuccessPage)
  • Title: Success!
  • Message Label: The success message text above
  • If desired, buttons such as ‘Return to Home Page’ or ‘Download Again’ can be added to guide the user.

Technical Risks

  • Authority Control: File download permissions must be set appropriately.

The ‘Download File From Server’ action enhances user experience and increases the flexibility of your application by enabling files stored on the server to be downloaded securely and easily to the user's device in Kuika applications.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar