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

Also accept io.Channel instances for up- and downloading #8

Merged
merged 4 commits into from
Sep 26, 2021

Conversation

thekid
Copy link
Member

@thekid thekid commented Sep 26, 2021

Upload

// Previously, files would need to be wrapped in streams
$conn->rootDir()->file('index.txt')->uploadFrom(new FileInputStream(new File('index.txt'));

// Now also possible
$conn->rootDir()->file('index.txt')->uploadFrom(new File('index.txt'));

Download

// Previously, files would need to be wrapped in streams
$conn->rootDir()->file('index.txt')->downloadTo(new FileInputStream(new File('index.txt'));

// Now also possible
$conn->rootDir()->file('index.txt')->downloadTo(new File('index.txt'));

@thekid thekid changed the title Also accept io.Channel instances in uploadFrom() Also accept io.Channel instances for up- and downloading Sep 26, 2021
@thekid thekid merged commit 7323983 into master Sep 26, 2021
@thekid thekid deleted the feature/upload-files branch September 26, 2021 17:08
@thekid
Copy link
Member Author

thekid commented Sep 26, 2021

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

Successfully merging this pull request may close these issues.

1 participant