Server Message Block (SMB)

Content Type: Module
Categories: Import/Export,Connectors,Data

Overview

Streamline your file operations with our powerful module designed for Mendix applications. This module offers essential Java actions that enable you to easily read, save, and delete files from a specified SMB path.

Documentation

Overview

This documentation provides a guide to configuring and using the SMB actions within your application. Follow these steps to set up the SMB configurations and understand how to leverage the provided microflows for each Java action. The SMB File Management module allows Mendix developers to efficiently handle file operations within their applications.

Typical Usage Scenario

The SMB File Management module is particularly useful for scenarios where applications require direct interaction with files stored on an SMB (Server Message Block) network share.

Common Use Cases:

  • Document Management: Easily read, save, and delete files, enabling seamless management of documents within your application.
  • Image Handling: Upload and manage images used in your application, ensuring they are readily accessible from your SMB path.
  • Data Backup: Utilize the save and delete features to manage backups of critical data stored in your application.

By integrating this module, customers can simplify complex file management tasks, improve application workflows, and enhance overall user experience.

Features and Limitations

Features:

  • Read File(s): Retrieve files from the specified SMB path for use within your application.
  • Save File(s): Upload new files to your SMB directory quickly and efficiently.
  • Delete a File: Remove a specific file as needed to keep your storage organized.

Limitations:

  • Access Permissions: The module requires appropriate SMB access permissions to read/write/delete files. Ensure that users have the necessary rights before attempting operations.

Dependencies

This module does not have any external dependencies. However, users must have access to an SMB server and proper network configuration to utilize the file operations effectively.

Configuration

  1. SMB Configuration Snippet:To begin, use the provided SNIP_SMBConfiguration snippet on your SMB admin configuration page. This snippet is designed to simplify and standardize the configuration process.

  2. Initializing the SMB Connection:Once you’ve added the configuration snippet, initialize your SMB connection from the admin page. Proper initialization ensures that your application can successfully communicate with the SMB server.

  3. Unique SMB Configuration Code:Each SMB configuration you create must have a unique Code. This unique identifier is essential for retrieving and utilizing the correct SMB configuration in your microflows and pages. Ensure that every configuration instance is labeled distinctly to avoid conflicts.

  4. Microflows and Java Actions:Inside the Microflows folder, you will find microflows corresponding to each Java Action. These microflows serve as practical examples, demonstrating how to effectively utilize the Java actions in your application. By reviewing and following these examples, you will better understand how to implement and extend the functionality of the SMB connection in your workflows.

Flags Description

  1. OverwriteInd

    • Used In: saveFile, saveFiles
    • Purpose: This flag controls whether the system should overwrite an existing file with the same name or not.
      • If OverwriteInd is set to true, the system will save the file, overwriting any existing file with the same name without warnings.
      • If set to false, the system will generate a UUID and append it to the file name before saving, ensuring that the existing file remains untouched.
  2. includeSubfolders

    • Used In: readFilesList
    • Purpose: This flag specifies whether to include subfolders when reading files from the specified directory.
      • If includeSubfolders is set to true, the system will recursively scan and read all files from the main directory and its subfolders.
      • If set to false, only the files in the main directory will be read, excluding any subfolder contents.

 

Releases

Version: 1.0.0
Framework Version: 9.24.11
Release Notes: 1.0.0