Skip to content

error code 4 when I try to upload a file via sftp #20

@ahoelzemann

Description

@ahoelzemann

I'm try to upload some data from my the smartphone to a server via sftp.
However, I keep on receveing an exception with the error code 4. The error message is only "failure", so it's pretty hard for me to understand what is going on.

I'm able to connect to the server and to create folders, but the upload itself is not working. The code itself is copied from your readme page. Both variables, serverPath and localFilePath are valid paths.

    final file = await sftp.open(serverPath, mode: SftpFileOpenMode.create | SftpFileOpenMode.write);
     await file.write(File(localFilePath).openRead().cast());

thank you and best regards.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions