feat: remote image preview — detect via magic bytes, download to temp for overlay

This commit is contained in:
vrubelroman 2026-05-13 13:28:19 +03:00
parent 2d6ec2e445
commit fae53d6fd3
3 changed files with 97 additions and 18 deletions

View file

@ -485,6 +485,11 @@ func (c *SSHClient) CopyFileFromRemote(remotePath, localPath string) error {
return nil
}
// DownloadFile downloads a remote file to a local path via SFTP.
func (c *SSHClient) DownloadFile(remotePath, localPath string) error {
return c.CopyFileFromRemote(remotePath, localPath)
}
// CopyDirToRemote recursively copies a local directory to a remote path.
func (c *SSHClient) CopyDirToRemote(localDir, remoteDir string) error {
return c.copyDirToRemote(localDir, remoteDir, nil, nil)