feat: add support for FTP and FTPS protocols

This commit is contained in:
2026-06-09 14:31:17 +01:00
parent a812d4ac35
commit 715c4eccb6
7 changed files with 199 additions and 0 deletions
+6
View File
@@ -83,6 +83,7 @@
<select id="conn-protocol" onchange="updateProtocolFields()">
<option value="s3">S3 / S3-Compatible</option>
<option value="sftp">SFTP</option>
<option value="ftp">FTP</option>
<option value="webdav">WebDAV</option>
<option value="smb">SMB</option>
<option value="nfs">NFS</option>
@@ -117,6 +118,11 @@
</div>
</div>
<div class="form-group" id="ftp-secure-group" style="display: none; align-items: center; gap: 0.5rem; flex-direction: row; margin-bottom: 1rem;">
<input type="checkbox" id="conn-secure" style="width: auto;">
<label style="margin: 0;">Use FTPS (Secure Explicit TLS)</label>
</div>
<div class="form-row">
<div class="form-group" style="flex: 1;">
<label>Username / Access Key</label>
+7
View File
@@ -46,6 +46,7 @@ async function init() {
bucket: document.getElementById('conn-bucket').value,
region: document.getElementById('conn-region').value,
path_style: document.getElementById('conn-pathstyle').checked,
secure: document.getElementById('conn-secure').checked,
username: document.getElementById('conn-username').value
};
let secret = document.getElementById('conn-secret').value;
@@ -105,6 +106,7 @@ window.editConnection = (id) => {
document.getElementById('conn-bucket').value = c.bucket || '';
document.getElementById('conn-region').value = c.region || '';
document.getElementById('conn-pathstyle').checked = c.path_style || false;
document.getElementById('conn-secure').checked = c.secure || false;
document.getElementById('conn-username').value = c.username || '';
document.getElementById('conn-secret').value = '';
document.getElementById('conn-secret-key').value = '';
@@ -119,6 +121,7 @@ window.openConnModal = () => {
document.getElementById('modal-title').innerText = "Add Connection";
document.getElementById('conn-form').reset();
document.getElementById('conn-id').value = uuidv4();
document.getElementById('conn-secure').checked = false;
document.getElementById('conn-secret').value = '';
document.getElementById('conn-secret-key').value = '';
document.getElementById('conn-sftp-auth-type').value = 'password';
@@ -142,6 +145,10 @@ window.updateProtocolFields = () => {
document.getElementById('region-group').style.display = showS3Specific ? 'flex' : 'none';
document.getElementById('pathstyle-group').style.display = showS3Specific ? 'flex' : 'none';
// FTP specific fields
const showFTP = protocol === 'ftp';
document.getElementById('ftp-secure-group').style.display = showFTP ? 'flex' : 'none';
// SFTP Auth Type toggle
const authTypeSelect = document.getElementById('conn-sftp-auth-type');
const secretInput = document.getElementById('conn-secret');