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

docs(file-upload): add file validators section #2360

Merged
merged 7 commits into from Jun 23, 2022

Conversation

thiagomini
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This Docs change is related to this PR which adds FileValidators

@thiagomini
Copy link
Contributor Author

@kamilmysliwiec pinging you here for visibility

Copy link
Member

@jmcdo29 jmcdo29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is there a way we could better type file in the FileValidator?

@thiagomini
Copy link
Contributor Author

LGTM. Is there a way we could better type file in the FileValidator?

Yea, I also thought about it.. the problem is that usually we can't reference Multer type on NestJS package and create a dependency. I had a discussion about that with Kamil but I can't find the original PR now 🤔 anyway, the final solution was to type it as any, but there might be a better solution, maybe with generics? I can work on that @jmcdo29

@jmcdo29
Copy link
Member

jmcdo29 commented Jun 21, 2022

Possibly just a hint on the docs could suffice, about what could be used and how to import it, but make it clear that this is just an option

@thiagomini
Copy link
Contributor Author

@jmcdo29 type hint added, line 111.

@thiagomini
Copy link
Contributor Author

@kamilmysliwiec I think I resolved all issues pointed out, would you mind to review again?

@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec changed the base branch from master to 9.0.0 June 23, 2022 08:39
@kamilmysliwiec
Copy link
Member

Any chance you can rebase to the 9.0.0 branch? @thiagomini 🙌

thiagomini and others added 6 commits June 23, 2022 09:30
add type hint for file in file validator
rewrite sentences as suggested

Co-authored-by: Kamil Mysliwiec <mail@kamilmysliwiec.com>
fix indentation of ts examples
fix table to ignore first row as header
fix bold text by changing it to html tag
@thiagomini
Copy link
Contributor Author

Done @kamilmysliwiec

@kamilmysliwiec
Copy link
Member

LGTM @thiagomini thanks!

@kamilmysliwiec kamilmysliwiec merged commit a3b2c40 into nestjs:9.0.0 Jun 23, 2022
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.

None yet

3 participants