You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we define a multipart/form-data content, which includes several properties, one of which is a file, if that file is defined in any order, using the legacy 2.0 approach - it gets fed in the order of which it was defined when reading the underlying form data stream. (expected result)
But when it is defined in the new 3.0 convention, for some reason, the data to the server is passed in a way that it is always the last element in the multipart/form-data, regardless in what order the file was defined.
Meaning if we had a single file, and 3 other properties of any other type,, the file would always be the last one to be read in the multipart/form-data request.
Is this a feature? If so, why the subtle differences?
The text was updated successfully, but these errors were encountered:
Background:
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.
Q&A (please complete the following information)
As per OpenAPI 3.0 specifications, there is no longer a type "file", but instead, we should define files using the type string and a format either binary, or byte. (Source: https://swagger.io/docs/specification/data-models/data-types/)
When we define a multipart/form-data content, which includes several properties, one of which is a file, if that file is defined in any order, using the legacy 2.0 approach - it gets fed in the order of which it was defined when reading the underlying form data stream. (expected result)
But when it is defined in the new 3.0 convention, for some reason, the data to the server is passed in a way that it is always the last element in the multipart/form-data, regardless in what order the file was defined.
Meaning if we had a single file, and 3 other properties of any other type,, the file would always be the last one to be read in the multipart/form-data request.
Is this a feature? If so, why the subtle differences?
The text was updated successfully, but these errors were encountered: