mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-10-08 15:27:28 +02:00
feat: Update port initialization and handling for FTP/SFTP configurations
- Changed default port initialization for source and destination configurations to 0, triggering default settings based on connection type. - Implemented logic to set default ports for FTP (21) and SFTP (22) in the frontend templates. - Enhanced input fields for FTP and SFTP forms to initialize and update port values dynamically based on user selections. - Updated backend configuration generation to include the correct port values for source and destination settings.
This commit is contained in:
1 parent
fde60b7d68
commit
748d5c0939
5 files changed
+42
-8
No files matched your search
@@ -637,6 +637,7 @@ func (db *DB) GenerateRcloneConfig(config *TransferConfig) error {
|
||||
"host", config.SourceHost,
|
||||
"user", config.SourceUser,
|
||||
"pass", config.SourcePassword,
|
||||
"port", fmt.Sprintf("%d", config.SourcePort),
|
||||
"--non-interactive",
|
||||
"--config", configPath,
|
||||
"--log-level", "ERROR",
|
||||
@@ -860,6 +861,7 @@ func (db *DB) GenerateRcloneConfig(config *TransferConfig) error {
|
||||
args := []string{
|
||||
"config", "create", destName, "ftp",
|
||||
"host", config.DestHost,
|
||||
"port", fmt.Sprintf("%d", config.DestPort),
|
||||
"user", config.DestUser,
|
||||
"pass", config.DestPassword,
|
||||
"--non-interactive",
|
||||
|
||||
Reference in new issue
Block a user