https://github.com/prabirshrestha/trillium-send-file
https://github.com/prabirshrestha/trillium-send-file
trillium
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/prabirshrestha/trillium-send-file
- Owner: prabirshrestha
- License: other
- Created: 2021-10-09T17:14:22.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T01:56:57.000Z (over 1 year ago)
- Last Synced: 2024-05-02T06:17:17.927Z (over 1 year ago)
- Topics: trillium
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
trillium-send-file
==================
Send file connection extension for [trillium.rs](https://trillium.rs/).
# Getting Started
```toml
[dependencies]
trillium = "0.2.0"
trillium-smol = "0.2.0"
trillium-send-file = { version = "0.1.0", features = ["smol"] }
```
Use `features = ["async-std"]` for async-std runtime.
# Example
## src/main.rs
```rust
use trillium::Conn;
use trillium_send_file::SendFileConnExt;
fn main() {
trillium_smol::run(|conn: Conn| async move {
conn.send_file("/tmp/file.txt".into()).await
});
}
```