Moved upload limit
This commit is contained in:
@ -125,12 +125,12 @@ async fn show_post(path: web::Path<(u64, String)>, req: HttpRequest) -> impl Res
|
||||
let _ = &mut ret_text.push_str(&format!("\n\
|
||||
<b>This is the link to your post. Don't lose it !\
|
||||
It can also be accessed raw using Curl or Wget.</b><br>\n\
|
||||
><i>{} @{}</i><br><br>\n", post.name, post.date));
|
||||
><i>{} @{}</i><br><br>\n<pre>\n", post.name, post.date));
|
||||
|
||||
let _ = match decrypt(post.crypt, &password) {
|
||||
Ok(v) => {
|
||||
let _ = &mut ret_text.push_str(&v);
|
||||
let _ = &mut ret_text.push_str("\n");
|
||||
let _ = &mut ret_text.push_str("\n</pre>\n");
|
||||
ret_text.push_str("</body>\n</html>");
|
||||
break;
|
||||
},
|
||||
@ -158,8 +158,10 @@ async fn get_index() -> impl Responder {
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.app_data(web::FormConfig::default().limit(1024 * 1000))
|
||||
.service(get_index)
|
||||
.service(post_index)
|
||||
.service(show_post)
|
||||
|
||||
Reference in New Issue
Block a user