mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat File storage (#3306)
* refactor: file upload * refactor: support upload plan * test: add tests
This commit is contained in:
@ -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 {
|
||||
|
@ -24,3 +24,6 @@ mod postgres;
|
||||
|
||||
#[cfg(feature = "impl_from_tokio")]
|
||||
mod tokio;
|
||||
|
||||
#[cfg(feature = "impl_from_url")]
|
||||
mod url;
|
||||
|
7
frontend/rust-lib/flowy-error/src/impl_from/url.rs
Normal file
7
frontend/rust-lib/flowy-error/src/impl_from/url.rs
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user