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 can successfully connect to the server and get a directory listing, but when attempting to upload a file, I get a failure with the following stack trace with the following code:
Error: Failure
at SFTPStream._transform (C:\Users\sam.bengtson\Documents\NodeProjects\nodejs\tsm-usg-batch\node_modules\ssh2\node_modules\ssh2-streams\lib\sftp.js:354:27)
at SFTPStream.Transform._read as __read
at SFTPStream._read (C:\Users\sam.bengtson\Documents\NodeProjects\nodejs\tsm-usg-batch\node_modules\ssh2\node_modules\ssh2-streams\lib\sftp.js:160:15)
at SFTPStream.Transform._write (_stream_transform.js:167:12)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at SFTPStream.Writable.write (_stream_writable.js:217:11)
at Channel.ondata (_stream_readable.js:540:20)
at Channel.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
Any thoughts?
The text was updated successfully, but these errors were encountered:
I should also point out that this will try to write to the root of the filesystem on the server, which your user may not have access to, so you may still get an error (due to insufficient permissions). If you want to save to the user's home directory or relative to the home directory, you can simply use the filename for the destination or use a relative path specifier (e.g. './foo/' + basename(currentFile) to upload to /home/user/foo/) since OpenSSH (and probably other servers) start with the cwd set to the user's home directory. Otherwise if you're wanting to upload anywhere else, you'll need to use the absolute path.
I can successfully connect to the server and get a directory listing, but when attempting to upload a file, I get a failure with the following stack trace with the following code:
Error: Failure
at SFTPStream._transform (C:\Users\sam.bengtson\Documents\NodeProjects\nodejs\tsm-usg-batch\node_modules\ssh2\node_modules\ssh2-streams\lib\sftp.js:354:27)
at SFTPStream.Transform._read as __read
at SFTPStream._read (C:\Users\sam.bengtson\Documents\NodeProjects\nodejs\tsm-usg-batch\node_modules\ssh2\node_modules\ssh2-streams\lib\sftp.js:160:15)
at SFTPStream.Transform._write (_stream_transform.js:167:12)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at SFTPStream.Writable.write (_stream_writable.js:217:11)
at Channel.ondata (_stream_readable.js:540:20)
at Channel.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
Any thoughts?
The text was updated successfully, but these errors were encountered: