Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file from memory #67

Open
kotyara85 opened this issue Jul 11, 2024 · 2 comments
Open

Upload file from memory #67

kotyara85 opened this issue Jul 11, 2024 · 2 comments

Comments

@kotyara85
Copy link

kotyara85 commented Jul 11, 2024

Sometimes you want to upload file from the memory, rather than reading from your disk.
This should be an easy implementation I can work on

@melbahja
Copy link
Owner

You can:

sf, err := client.NewSftp()
// handle err
defer sf.Close()

remote, err := sf.Create("/path/to/remote")
// handle err
defer remote.Close()

//io.Copy(remote, Reader from memory)

@kotyara85
Copy link
Author

Yes, just wanted to have this exposed in the api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants