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

Rename Body::from_file, add Body::from_file #296

Closed
wants to merge 2 commits into from

Conversation

brightly-salty
Copy link
Contributor

This PR renames Body::from_file to Body::from_path, and adds Body::from_file, which takes an async_std::fs::File like the name would suggest.

Fixes #185.

Semver-major.

@joshtriplett
Copy link
Member

This and #318 have the same approach now, with slightly different handling of filename-based MIME-type guessing. See the comment at #318 (comment) for a summary.

@joshtriplett
Copy link
Member

Closing in favor of the similar implementation in #318 , which additionally splits out path-based MIME-type guessing. But thank you very much for your work on this; much appreciated.

@brightly-salty brightly-salty deleted the body-fs branch January 24, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major This change requires a semver major change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Body::from_file should actually be Body::from_path, and Body::from_file should take a File
3 participants