-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileParts always empty #12
Comments
Coming from the example, please refer to the line where you need to configure the awmp configuration itself. #[actix_rt::main]
async fn main() -> Result<(), std::io::Error> {
actix_web::HttpServer::new(move || {
actix_web::App::new()
.data(awmp::Parts::configure(|cfg| cfg.with_file_limit(1_000_000)))
.route("/", actix_web::web::post().to(upload))
})
.bind("0.0.0.0:3000")?
.run()
.await
}
|
I also have this similar problem.
And then used curl to upload file
But no such issue in v3 example
The same curl command is OK to upload success
|
Hi @cybertanyellow, sorry, this is just a case of a bad example. At one point, I was using example App::new()
.data(awmp::Parts::configure(|cfg| cfg.with_file_limit(1)))
.route("/", web::post().to(upload)) This means that any non-empty file is going to be filtered out. I've updated the example now to have the same limit here as |
Hi @kardeiz, All workable. Thanks your support. |
I'm trying to upload a file using a form :
I get normally the text part, but the image part
Code:
Rust version : 1.46.0 (04488afe3 2020-08-24
awmp version: 0.6.0
The text was updated successfully, but these errors were encountered: