You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using sftp connection to download files. Ftp plugin uses Phpseclibs get function in SFTP.php. Function has two parameters: $remote_file and $local_file. If $local_file parameter is left empty (or is boolean false) SFTP.php function returns the data instead of simply downloading it.
I'd like to be able to use this functionality, but read function in ftp_source.php has a check which doesn't allow that:
if (empty($data['remote']) || empty($data['local'])) {
return false;
}
I had to disable this check and I also modified the function so that it returns the results from SFTP.php's get function, instead of simply returning true or false. This way I can get the data all the way to my controller and I can display files (like images), instead of just downloading them.
I'll try to submit patches later when I have time.
The text was updated successfully, but these errors were encountered:
I'm using sftp connection to download files. Ftp plugin uses Phpseclibs get function in SFTP.php. Function has two parameters: $remote_file and $local_file. If $local_file parameter is left empty (or is boolean false) SFTP.php function returns the data instead of simply downloading it.
I'd like to be able to use this functionality, but read function in ftp_source.php has a check which doesn't allow that:
if (empty($data['remote']) || empty($data['local'])) {
return false;
}
I had to disable this check and I also modified the function so that it returns the results from SFTP.php's get function, instead of simply returning true or false. This way I can get the data all the way to my controller and I can display files (like images), instead of just downloading them.
I'll try to submit patches later when I have time.
The text was updated successfully, but these errors were encountered: