Skip to content

Commit a9f987f

Browse files
committed
remove validation
1 parent 5e27b8c commit a9f987f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

api/src/handler/file.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ pub async fn upload(
2727
headers: HeaderMap,
2828
multipart: Multipart,
2929
) -> ApiResult<Json<UploadResponse>> {
30-
// crate::util::file_name::validate(&file_name)?;
3130
query.validate()?;
3231
let auth = crate::util::http::parse_basic_auth(&headers)?;
33-
let (path, expire_time) =
34-
service::file::store(&state, &query, auth, multipart).await?;
32+
let (path, expire_time) = service::file::store(&state, &query, auth, multipart).await?;
3533
let url = path.url(&state.config.domain);
3634
let qrcode = crate::util::qrcode::encode(&url)?;
3735
Ok(Json(UploadResponse {

api/src/util/arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ pub fn get_env_source(prefix: &str) -> Environment {
44
config::Environment::with_prefix(prefix)
55
.prefix_separator("__")
66
.separator("__")
7-
}
7+
}

0 commit comments

Comments
 (0)