fix(core): marking files as pipeable #6809
Merged
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.
The two decorators @uploadedfile and @uploadedfiles have been marked as pipeable,
however this had no affect as this method was preventing their execution.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, the interface for
@UploadedFile
and@UploadedFiles
describes the possibility of adding pipes to somehow transform the file object. However, this does not work at the moment since theisPipeable
method does not acceptFILE
andFILES
as "pipeable".Issue Number: #4752 (original feature request) / #6344 (comment) (specific bug targeted by this PR)
What is the new behavior?
The pipes are actually run and can alter the file object and the files array.
Does this PR introduce a breaking change?
Other information
Personally I would tend to refactor that many comparisons of a value to a set so that I can call
.has()
. If that is something you want, then I can update the PR