feat File storage (#3306)

* refactor: file upload

* refactor: support upload plan

* test: add tests
This commit is contained in:
Nathan.fooo
2023-09-01 22:27:29 +08:00
committed by GitHub
parent df8642d446
commit c652c32575
35 changed files with 844 additions and 306 deletions

View File

@ -232,6 +232,12 @@ pub enum ErrorCode {
#[error("It appears that the workspace data has not been fully synchronized")]
WorkspaceDataNotSync = 76,
#[error("Excess storage limited")]
ExcessStorageLimited = 77,
#[error("Parse url failed")]
InvalidURL = 78,
}
impl ErrorCode {

View File

@ -24,3 +24,6 @@ mod postgres;
#[cfg(feature = "impl_from_tokio")]
mod tokio;
#[cfg(feature = "impl_from_url")]
mod url;

View File

@ -0,0 +1,7 @@
use crate::{ErrorCode, FlowyError};
impl std::convert::From<url::ParseError> for FlowyError {
fn from(error: url::ParseError) -> Self {
FlowyError::new(ErrorCode::InvalidURL, "").with_context(error)
}
}