fix error reporting for shortcut upload

This commit is contained in:
Vincent Breitmoser 2019-06-06 16:33:16 +02:00
parent 86322e34e0
commit 315a3c6615
No known key found for this signature in database
GPG Key ID: 7BD18320DEADFA11
3 changed files with 2 additions and 2 deletions

1
dist/templates/400-plain.html.hbs vendored Normal file
View File

@ -0,0 +1 @@
Bad request: {{error}}

View File

@ -1 +0,0 @@
Error: {{internal_error}}

View File

@ -222,7 +222,7 @@ pub fn quick_upload(
let mut buf = Vec::default();
if let Err(error) = std::io::copy(&mut data.open().take(UPLOAD_LIMIT), &mut buf) {
return MyResponse::bad_request("500-plain", failure::err_msg(error));
return MyResponse::bad_request("400-plain", failure::err_msg(error));
}
MyResponse::upload_response_quick(vks::process_key(