feat: remote image preview — detect via magic bytes, download to temp for overlay
This commit is contained in:
parent
2d6ec2e445
commit
fae53d6fd3
3 changed files with 97 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue