Implement cURL API #15

Merged
blek merged 7 commits from curlapi into 0.2-dev 2023-11-02 15:17:00 +01:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 164af11b8b - Show all commits

View File

@ -47,7 +47,7 @@ pub async fn upload(form: FormData, ip: Option<IpAddr>, state: SharedState) -> R
}
if let Some(pass) = state.config.files.upload_pass {
let mut pass_valid = false;
let pass_valid: bool;
if let Some(upass) = formdata.instancepass {
pass_valid = upass == pass;
} else {
@ -85,7 +85,7 @@ pub async fn upload(form: FormData, ip: Option<IpAddr>, state: SharedState) -> R
"File uploaded successfully.\n",
"It is available via this link:\n\n",
"{}/upload/{}"
"{}/upload/{}\n"
),
state.env.instanceurl,
urlencoding::encode(