diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index 1c6394a..dfcfe6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -94,12 +94,14 @@ pub async fn get_app_with_file( media_endpoint: Option<String>, internal_token: Option<String>, ) -> App<database::FileStorage> { + let folder = backend_uri.strip_prefix("file://").unwrap(); + let path = std::path::PathBuf::from(folder); let app = tide::with_state(ApplicationState { token_endpoint, media_endpoint, authorization_endpoint, internal_token, - storage: database::FileStorage::new(todo!()).await.unwrap(), + storage: database::FileStorage::new(path).await.unwrap(), http_client: surf::Client::new(), }); |