Skip to content
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(core): marking files as pipeable #6809

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

lucavb
Copy link
Contributor

@lucavb lucavb commented Mar 31, 2021

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?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

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 the isPipeable method does not accept FILE and FILES 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?

[ ] Yes
[X] No

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

The two decorators @uploadedfile and @uploadedfiles have been marked as pipeable,
however this had no affect as this method was preventing their execution.

Original Issue nestjs#4752
Bug fixed by this commit nestjs#6344 (comment)
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4aad8c0e-8e3f-48bc-8ccb-1c41744358ce

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.621%

Totals Coverage Status
Change from base Build 77925e0e-a374-4cbf-9a84-98f285ee9e40: 0.0%
Covered Lines: 5119
Relevant Lines: 5410

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit 82d4802 into nestjs:master Mar 31, 2021
@kamilmysliwiec
Copy link
Member

LGTM, it will be added in the next release

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

Successfully merging this pull request may close these issues.

3 participants