-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Streaming body parser: Multipart #200
Streaming body parser: Multipart #200
Conversation
$this->body->removeListener('data', $this->onDataCallable); | ||
$this->body->close(); | ||
}); | ||
$this->promise = $deferred->promise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the promise property really needed? Looks like it's only used in MultipartParser::cancel()
. I think this is unecessary and
$this->body->removeListener('data', $this->onDataCallable);
$this->body->close();
can be just called directly there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, fixed it 👍
/** | ||
* @internal | ||
*/ | ||
public function stripTrainingEOL($chunk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: stripTrainingEOL
-> stripTrailingEOL
@WyriHaximus superseded by #223? |
@docteurklein No worries, I think this is a very relevant question 👍 As per #28 (comment) and #105 and we've decided to implement full PSR-7 support for v0.8.0 first. This includes form post handling and support for file uploads. We believe that this fulfills most use cases and as such resolves this issue for most users of this library. While we have added relevant documentation and tests to our project for its limitations, I agree that it would be nice to also have streaming upload functionality built-in. That being said, I'm not aware of anybody currently working on this. If you want to look into this (or want to sponsor this feature), then go for it! Reach out if you have any questions! |
@WyriHaximus or @clue sorry for bumping you, is this feature aka streaming upload implemented in the latest http lib? |
@omar391, yes this is implemented (with PSR-7 support), but there are limitations. @clue wrote a detailed answer in #428 (comment) , this should answer everything related to this topic :) Hope this helps 👍 |
@SimonFrings Thank you for the reference. I guess I need to wait for a capable streaming implementation. 🤔 BTW, can you please refer me to an implementation of multi part upload client? Thank you! |
@omar391 There's currently no implementation on the client side in ReactPHP for this, but it definitely sounds like a useful feature to add to this project. I didn't find any open tickets for this, so maybe it's worth to open up a discussion inside our recently activated GitHub Discussions. This way we can talk about a potential implementation for this and also make this topic more visible for others! |
FYI: See https://github.com/orgs/reactphp/discussions/471 for further conversation. |
Supersedes / closes #72