-
Notifications
You must be signed in to change notification settings - Fork 9k
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
fix: preserve multipart file part position in requestData #7008
Merged
tim-lai
merged 3 commits into
swagger-api:master
from
mathis-m:bug/file-preserve-position
Mar 10, 2021
Merged
fix: preserve multipart file part position in requestData #7008
tim-lai
merged 3 commits into
swagger-api:master
from
mathis-m:bug/file-preserve-position
Mar 10, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when providing type string format binary aka file position is not preserved, because it is not registered on component mount like all others do. So the state is later on corrupted, because when the file is set and so a new property will be added to requestData Map in state. This results in beeing the last property. since all other properties' components are registering their value on component mount, the oder is preserved for those. Signed-off-by: mathis-m <[email protected]>
mathis-m
force-pushed
the
bug/file-preserve-position
branch
from
February 27, 2021 05:18
7640625
to
039fa86
Compare
tim-lai
reviewed
Mar 3, 2021
@mathis-m PR merged! Thanks for the fix! Also, that's an interesting tidbit about |
This was referenced Mar 12, 2021
Closed
This was referenced Mar 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
when providing type string format binary aka file position is not preserved,
because it is not registered on component mount like all others do.
So the state is later on corrupted,
because when the file is set and so a new property will be added to requestData Map in state.
This results in beeing the last property.
since all other properties' components are registering their value on component mount,
the oder is preserved for those.
Signed-off-by: mathis-m [email protected]
Motivation and Context
Fixes #6979
How Has This Been Tested?
http://localhost:3200/?url=https://gist.githubusercontent.com/mathis-m/33cfc17fe6e4057702f39651c7aec510/raw/8de7e798e5482069faad5d0595056629810181e7/aUf3bOBB9g.txt
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests