Skip to main content

Crate slash_files

Crate slash_files 

Source
Expand description

slash-files-rs is an embeddable file browser for Rust web backends.

It provides:

  • a polished HTMX-based file browser UI
  • a JSON API for browsing, search, downloads, deletes, and transfers
  • multi-mount support with mount health reporting
  • built-in previews for common browser-renderable file types
  • extension hooks for custom preview rendering
  • feature-gated adapters for Axum, Actix-web, and Poem

Enable one or more adapter features depending on your host framework:

  • axum
  • actix-web
  • poem

§Example

use slash_files::{AxumFileServer, FileServerConfig};

let file_server = AxumFileServer::new(
    FileServerConfig::new("./data").with_mount_path("/files"),
);

let _ = file_server;

Re-exports§

pub use config::Branding;
pub use config::FeatureFlags;
pub use config::FileMount;
pub use config::FileServerConfig;
pub use config::RoutePaths;
pub use config::Theme;
pub use fs::DeleteSummary;
pub use fs::FileAsset;
pub use fs::FileService;
pub use fs::FileServiceError;
pub use fs::MoveSummary;
pub use model::BatchEntry;
pub use model::Breadcrumb;
pub use model::DirectoryListing;
pub use model::DownloadLauncherEntry;
pub use model::FileEntry;
pub use model::FileKind;
pub use model::MountOption;
pub use model::MoveTargetOption;
pub use model::SearchResults;
pub use model::StorageUsage;
pub use preview::PreviewDocument;
pub use preview::PreviewHandler;
pub use preview::PreviewRegistry;
pub use preview::PreviewRequest;

Modules§

config
fs
model
preview
templates
web