feat: support uploading image to cloud storage (#4413)

* feat: add object ext

* feat: integrate upload image api

* feat: support uploading local file to cloud

* feat: abstact the CachedNetworkImage as FlowyNetworkImage

* ci: fix tauri ci

* fix: integration test

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Zack
2024-01-20 23:16:18 +08:00
committed by GitHub
parent 4852e5c8d4
commit 0a0f2adf76
24 changed files with 687 additions and 122 deletions

View File

@ -19,8 +19,9 @@ where
fn get_object_url(&self, object_id: ObjectIdentity) -> FutureResult<String, FlowyError> {
let try_get_client = self.0.try_get_client();
FutureResult::new(async move {
let file_name = format!("{}.{}", object_id.file_id, object_id.ext);
let client = try_get_client?;
let url = client.get_blob_url(&object_id.workspace_id, &object_id.file_id);
let url = client.get_blob_url(&object_id.workspace_id, &file_name);
Ok(url)
})
}