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:
Nathan.fooo 2024-06-20 07:44:57 +08:00 committed by GitHub
parent fdaca36b87
commit b64da2c02f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 2687 additions and 643 deletions

View file

@ -32,6 +32,28 @@ diesel::table! {
}
}
diesel::table! {
upload_file_part (upload_id, e_tag) {
upload_id -> Text,
e_tag -> Text,
part_num -> Integer,
}
}
diesel::table! {
upload_file_table (workspace_id, file_id, parent_dir) {
workspace_id -> Text,
file_id -> Text,
parent_dir -> Text,
local_file_path -> Text,
content_type -> Text,
chunk_size -> Integer,
num_chunk -> Integer,
upload_id -> Text,
created_at -> BigInt,
}
}
diesel::table! {
user_data_migration_records (id) {
id -> Integer,
@ -80,11 +102,13 @@ diesel::table! {
}
diesel::allow_tables_to_appear_in_same_query!(
chat_message_table,
chat_table,
collab_snapshot,
user_data_migration_records,
user_table,
user_workspace_table,
workspace_members_table,
chat_message_table,
chat_table,
collab_snapshot,
upload_file_part,
upload_file_table,
user_data_migration_records,
user_table,
user_workspace_table,
workspace_members_table,
);