Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

updated for usage in actix-web 4.0.0-beta.21 #1

Closed
wants to merge 3 commits into from

Conversation

1zun4secondary
Copy link

@1zun4secondary 1zun4secondary commented Jan 24, 2022

Hello,

I am very happy about this library. It works great and is so much easier to use than handling the multipart data yourself.
I ran into issues with using actix-web 4.0.0 because of the tokio runtime and the FromRequest trait changes. I forked your library and somehow fixed it. I literally ruined your code, but might consider fixing it up and merging it into another branch for other people to use. 馃憤馃徏

Greetings,
1zuna

@jacob-pro
Copy link
Owner

jacob-pro commented Jan 24, 2022

Hey, thanks @1zun4 I'm glad it is useful to you.
Yeah I would be happy to accept a PR to upgrade master to actix-4 (and I will just make a branch for the actix-3 version).
Would you be willing to tidy up this PR a bit first - I will add a few comments for what needs to be done?

@1zun4secondary
Copy link
Author

1zun4secondary commented Jan 26, 2022

Hey, thanks @1zun4 I'm glad it is useful to you. Yeah I would be happy to accept a PR to upgrade master to actix-4 (and I will just make a branch for the actix-3 version). Would you be willing to tidy up this PR a bit first - I will add a few comments for what needs to be done?

I am not very familiar with writing tests using actix-web 4.0.0. I've been looking into it, but it seems there are a few things missing for multipart support. What has to be done is following:

  • Rewrite/Update tests for actix-web 4.0.0 (2x) and run all of them and pass
  • Handle async block errors and pass IO errors
  • Remove some of commented out code (which is not required anymore)

fixed IO error not being handled
blocking error is now being converted as IO PayloadError (see actix-web source for BlockingError)
@jacob-pro
Copy link
Owner

jacob-pro commented Jan 27, 2022

@1zun4
I have upgraded this to actix 4 in this commit
d972322
https://crates.io/crates/actix-easy-multipart/2.0.0-beta.1

To fix the tests I migrated to using reqwest instead of awc and actix-multipart-rfc7578 because the two were causing version conflicts with all the different beta versions of actix crates in the tree.

@1zun4secondary
Copy link
Author

Good 馃憤馃徏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants