Last updated

Sending and Receiving Files

This section outlines the procedures and configurations necessary for sending and receiving files using the SDK. The process involves two primary directories, one for incoming files (referred to as the FileIn folder) and another for outgoing files (referred to as the FileOut folder). Understanding these mechanisms is crucial for leveraging the file transfer capabilities of the SDK effectively.

FileIn and FileOut Folders

When integrating our SDK into your application, especially within a containerized environment, the FileIn and FileOut folders play a pivotal role in managing file transfers:

  • FileIn Folder: This is the designated directory for receiving files. Any files transferred to your application will appear in this folder.
  • FileOut Folder: This folder is intended for files that are being sent from your application. Place any files you wish to send in this directory.

Shared Folders in Container Configuration

For applications running in containers, the FileIn and FileOut folders are shared with the FileManager component through the container's configuration settings. This setup facilitates seamless file transfers between your application and the FileManager.

File Transfer Phases

Files in the FileOut folder move through several stages during the transfer process, represented by subfolders within FileOut:

  • InProgress: Files currently being uploaded are placed in the FileOut/InProgress subfolder. Removing a file from this folder will cancel the upload process.
  • Failed: Should an upload attempt fail, the file will be relocated to the FileOut/Failed subfolder.
  • Complete: Successfully uploaded files are moved to the FileOut/Complete subfolder.

It is important for apps to periodically check the FileIn folder for incoming files to ensure they are processed timely, and it is the responsibility of the app to clean the file once it is consumed to make sure files do not pile up, potentially causing full disk issues on the gateway.

FileManager does not delete any file within FileIn.

Development and Configuration

During the development phase, you can simulate file transfers by manually placing files into the FileIn and FileOut folders. However, for production deployment, it is advised to use configuration parameters to set the paths for these folders. This approach allows the operations team to adjust shared volume settings, ensuring your application connects seamlessly with the FileManager and other components.

By following these guidelines, you can integrate file transfer functionalities into your app efficiently.


Sharing Files at the Edge

This section delves into the mechanisms and protocols involved in sharing files with users at the edge, emphasizing security, accessibility, and simplicity. Agora enables file sharing through a web interface, utilizing authentication and authorization (AuthN/Z) protocols to ensure secure and controlled access to files and folders shared by your application.

Web Page Integration for File Sharing

Files and folders intended for sharing at the edge are accessible via a dedicated web page. This web page is designed to implement robust AuthN/Z mechanisms, safeguarding the access to shared resources. Only users who have been authenticated (verified their identity) and authorized (granted permission) can access the files and folders shared by your application.

Role of the Operations Team

The configuration of AuthN/Z is meticulously maintained by the operations team. This configuration is crucial for enabling end users in the field to securely access the edge website, provided the Edge Application Gateway (EAG) is deployed and operational. The operations team plays a pivotal role in ensuring the security protocols are up to date and effectively protect the shared files and folders.

Simplified Process for File Sharing

To facilitate a streamlined and secure file-sharing process, your application can share files and folders at the edge by organizing them into a designated folder. This setup requires configuring the shared volumes on the container to allow access by the FileManager. The FileManager actively monitors the application's LocalShare folder and utilizes the EAG to publish the files, making them accessible via the edge website.

Security and Access Control

A key aspect of this file-sharing mechanism is that shared files are exclusively available for download by authorized users. This ensures that sensitive or proprietary information remains secure and is only accessible to users who have been granted explicit permission. Moreover, this system is designed with a security-first approach, meaning authorized users are restricted from uploading files to your application through this mechanism. This restriction further enhances the security posture by limiting the potential vectors for unauthorized access or data breaches.

By adhering to these guidelines and leveraging the FileManager along with the EAG, your application can securely share files and folders with users at the edge, ensuring that only authorized individuals have access to the shared resources. This system not only prioritizes security but also simplifies the process of file sharing, making it an efficient solution for edge-based file distribution.