mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-26 08:38:29 +00:00
SFTP: fix issue with uploading via a resource
This commit is contained in:
parent
e48ee12940
commit
7ed53f2428
@ -1875,7 +1875,7 @@ class Net_SFTP extends Net_SSH2
|
||||
$sftp_packet_size-= strlen($handle) + 25;
|
||||
$i = 0;
|
||||
while ($sent < $size) {
|
||||
$temp = $mode & NET_SFTP_LOCAL_FILE ? fread($fp, $sftp_packet_size) : substr($data, $sent, $sftp_packet_size);
|
||||
$temp = isset($fp) ? fread($fp, $sftp_packet_size) : substr($data, $sent, $sftp_packet_size);
|
||||
$subtemp = $offset + $sent;
|
||||
$packet = pack('Na*N3a*', strlen($handle), $handle, $subtemp / 4294967296, $subtemp, strlen($temp), $temp);
|
||||
if (!$this->_send_sftp_packet(NET_SFTP_WRITE, $packet)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user