-
-
Notifications
You must be signed in to change notification settings - Fork 35
Renaming ez.file() to ez.download()
#2667
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
Conversation
| export const ezRawBrand = Symbol("Raw"); | ||
|
|
||
| const base = z.object({ raw: file("buffer") }); | ||
| const base = z.object({ raw: download("buffer") }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should address buffer schema directly
RobinTail
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, it would be even better to remove ez.file() completely, but expose the buffer schema with a suggestion to use .meta() for setting customized props depending on particular needs.
|
Doing #2668 instead |
Here I'm addressing the possible confusion between
ez.file()and the new schema of Zod 4z.file().The proprietary one is designed for depicting file content in response having the form of string or a buffer.
For the sake of consistency with
ez.upload()I'm renaming it toez.download().