i want to move file from my local to another server using sftp, here is my sftp setting in config/filesystem.php
'sftp' => [
'driver' => 'sftp',
'host' => '192.xxx.0.xxx',
'port' => 22,
'username' => 'xxx',
'password' => 'xxx',
'root' => '/',
'timeout' => 10,
],
and here is my code in controller
$file_local = public_path().'/documents/1.pdf';
$file_sftp = Storage::disk('sftp')->put('1.pdf', $file_local);
$move = File::move($file_local, $file_ftp);
but in the sftp folder, the file is exist but corrupted, please need your help