Moved upload limit
This commit is contained in:
22
README.md
22
README.md
@ -19,6 +19,22 @@ The link can be used via a browser normally; it can also be used with curl or wg
|
||||
|
||||
For now, notes are kept forever until some admin manually removes them.
|
||||
|
||||
TODO :
|
||||
* Put the "files" folder somewhere else
|
||||
* Write a dockerfile
|
||||
## Warnings
|
||||
The size of a post is limited to 1MB. This value can be changed in the source code, see the end of the main function, at the bottom of src/main.rs :
|
||||
```rust
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
//Limit is configured here
|
||||
.app_data(web::FormConfig::default().limit(1024 * 1000))
|
||||
.service(get_index)
|
||||
.service(post_index)
|
||||
.service(show_post)
|
||||
})
|
||||
.bind(("0.0.0.0", 8080))?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user