fix(file-manager): repair uploads and shared SFTP access
Build and publish Docker image / build-and-publish (push) Successful in 12s

This commit is contained in:
wfalkowski committed 2026-10-23 20:50:13 +00:00
1 parent 4c2f5f2c01
commit 2fcd0c3ef9
6 files changed
+275 -9

No files matched your search

+8 -4
View File
@@ -877,7 +877,9 @@ class KubernetesManager:
# Ensure directory exists
dir_path = '/'.join(file_path.split('/')[:-1]) if '/' in file_path else '.'
if dir_path and dir_path != '.':
self.create_directory(namespace, pod_name, dir_path, container_name=container_name)
if not self.create_directory(namespace, pod_name, dir_path, container_name=container_name):
logger.error("Failed to create parent directory for upload: %s", dir_path)
return False
escaped_path = file_path.replace("'", "'\\''")
temp_file = f"/tmp/upload_{int(time.time() * 1000000)}.b64"
@@ -906,7 +908,7 @@ class KubernetesManager:
return False
# Verify file was created and has content
check_cmd = ["sh", "-c", f"test -f '{escaped_path}' && test -s '{escaped_path}' && echo 'exists' || echo 'missing'"]
check_cmd = ["sh", "-c", f"test -f '{escaped_path}' && echo 'exists' || echo 'missing'"]
result = self.exec_command(namespace, pod_name, check_cmd, container_name=container_name)
if 'exists' not in result:
@@ -930,7 +932,9 @@ class KubernetesManager:
# Ensure directory exists
dir_path = '/'.join(file_path.split('/')[:-1]) if '/' in file_path else '.'
if dir_path and dir_path != '.':
self.create_directory(namespace, pod_name, dir_path, container_name=container_name)
if not self.create_directory(namespace, pod_name, dir_path, container_name=container_name):
logger.error("Failed to create parent directory for upload: %s", dir_path)
return False
escaped_path = file_path.replace("'", "'\\''")
temp_file = f"/tmp/upload_{int(time.time() * 1000000)}.b64"
@@ -961,7 +965,7 @@ class KubernetesManager:
return False
# Verify file was created and has content
check_cmd = ["sh", "-c", f"test -f '{escaped_path}' && test -s '{escaped_path}' && echo 'exists' || echo 'missing'"]
check_cmd = ["sh", "-c", f"test -f '{escaped_path}' && echo 'exists' || echo 'missing'"]
result = self.exec_command(namespace, pod_name, check_cmd, container_name=container_name)
if 'exists' not in result: