Nathan.fooo b64da2c02f
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
2024-06-20 07:44:57 +08:00

20 lines
558 B
SQL

-- Your SQL goes here
CREATE TABLE upload_file_table (
workspace_id TEXT NOT NULL,
file_id TEXT NOT NULL,
parent_dir TEXT NOT NULL,
local_file_path TEXT NOT NULL,
content_type TEXT NOT NULL,
chunk_size INTEGER NOT NULL,
num_chunk INTEGER NOT NULL,
upload_id TEXT NOT NULL DEFAULT '',
created_at BIGINT NOT NULL,
PRIMARY KEY (workspace_id, parent_dir, file_id)
);
CREATE TABLE upload_file_part (
upload_id TEXT NOT NULL,
e_tag TEXT NOT NULL,
part_num INTEGER NOT NULL,
PRIMARY KEY (upload_id, e_tag)
);