mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: File upload (#5542)
* chore: rename service * refactor: upload * chore: save upload meta data * chore: add sql test * chore: uploader * chore: fix upload * chore: cache file and remove after finish * chore: retry upload * chore: pause when netowork unreachable * chore: add event test * chore: add test * chore: clippy * chore: update client-api commit id * chore: fix flutter test
This commit is contained in:
@ -88,6 +88,10 @@ impl AuthenticateUser {
|
||||
PathBuf::from(self.user_paths.user_data_dir(uid)).join("indexes")
|
||||
}
|
||||
|
||||
pub fn get_application_root_dir(&self) -> &str {
|
||||
self.user_paths.root()
|
||||
}
|
||||
|
||||
pub fn close_db(&self) -> FlowyResult<()> {
|
||||
let session = self.get_session()?;
|
||||
info!("Close db for user: {}", session.user_id);
|
||||
|
@ -63,6 +63,11 @@ impl UserPaths {
|
||||
pub(crate) fn user_data_dir(&self, uid: i64) -> String {
|
||||
format!("{}/{}", self.root, uid)
|
||||
}
|
||||
|
||||
/// The root directory of the application
|
||||
pub(crate) fn root(&self) -> &str {
|
||||
&self.root
|
||||
}
|
||||
}
|
||||
|
||||
impl UserDBPath for UserPaths {
|
||||
|
Reference in New Issue
Block a user