slash-files-rs
slash-files-rs is an embeddable file browser for Rust web applications.
It gives you a polished HTMX frontend, a JSON API, multi-mount support, previews, batch operations, and framework adapters so you can mount a browser at a configurable route and point it at one or more server directories.
Features
- configurable mount path and branding
- multiple named mounts with availability reporting
- directory browsing, sorting, and flattened filename search
- file previews for common browser-supported types
- custom preview hooks for application-specific file types
- raw downloads, archive downloads, batch delete, and cross-mount transfer
- JSON API mirroring the main mounted behavior
- feature-gated adapters for Axum, Actix-web, and Poem
Crate features
axumactix-webpoem
Enable only the adapter feature(s) you need.
Quick start
Axum
Cargo.toml
[]
= { = "0.1.0", = ["axum"] }
main.rs
use Router;
use ;
let file_server = new;
let app = new.merge;
Actix-web
Cargo.toml
[]
= { = "0.1.0", = ["actix-web"] }
main.rs
use ;
use ;
let file_server = new;
new;
Poem
Cargo.toml
[]
= { = "0.1.0", = ["poem"] }
main.rs
use ;
let file_server = new;
let app = file_server.route;
Docs
- JSON API:
docs/json-api.md - Framework support:
docs/framework-support.md