Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Generic FTP/SFTP Connector Classes #32735

Open
atm-quentin opened this issue Jan 21, 2025 · 0 comments
Open

Add Generic FTP/SFTP Connector Classes #32735

atm-quentin opened this issue Jan 21, 2025 · 0 comments
Labels
Feature request This is a feature request

Comments

@atm-quentin
Copy link
Contributor

Feature Request

This feature request suggests creating generic FTP/SFTP connector classes that can be used across multiple modules in Dolibarr, simplifying and centralizing the file transfer operations.

Use case

Currently, FTP and SFTP connections are implemented in a variety of ways across different modules, which leads to code duplication and difficulties in maintenance. A unified approach will allow for easy management of file transfers, consistent error handling, and a more modular and extendable system.

Suggested implementation

Create a central class (or set of classes) that handles:

  • FTP and SFTP connection establishment.
  • File upload, download, and management.
  • Error handling and logging.
  • Support for additional features like SSH key authentication, passive mode, and more.

The classes should be designed to integrate seamlessly with existing Dolibarr modules, allowing easy adoption and reducing duplication of code for FTP/SFTP functionality.

Suggested steps

  1. Analyze current FTP/SFTP implementations across Dolibarr to identify common functionalities and patterns.
  2. Design a central class with reusable methods for connecting, uploading, downloading, and error handling.
  3. Integrate the classes into the core system, ensuring backward compatibility with existing modules that require FTP/SFTP.
  4. Write tests for various FTP/SFTP scenarios, including error handling and edge cases.
  5. Update relevant documentation and examples for module developers to easily adopt the new connector classes.
@atm-quentin atm-quentin added the Feature request This is a feature request label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request This is a feature request
Projects
None yet
Development

No branches or pull requests

1 participant