-
Notifications
You must be signed in to change notification settings - Fork 79
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
Update FormData and route handlers examples #179
base: main
Are you sure you want to change the base?
Update FormData and route handlers examples #179
Conversation
@max-programming is attempting to deploy a commit to the Cloudinary DevX Team on Vercel. A member of the Team first needs to authorize it. |
hey is this still a WIP per your description? |
@colbyfayock Yes, the README updates are remaining. Done. Review and let me know Plus I'll try to update the rest of 2 remaining examples as well in this PR itself |
@@ -0,0 +1,4 @@ | |||
{ |
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.
have you thought about moving prettier to the root of the project?
that way we dont have to manage this in every single repo, it would be a bit cleaner and less to worry about in each example and inherit from the root of the project
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.
I noticed there is some inconsistency between prettier configs in other projects. Like svelte, vue, etc
I will take the commons from all projects using prettier and put that in the root, and other settings like prettier-plugin-svelte
will keep them in the individual files
Does that work?
- Add environment variables to a `.env.local` file: | ||
```sh | ||
CLOUDINARY_CLOUD_NAME="" |
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.
these shoulld have the NEXT_PUBLIC_ prefix onthe first 2
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.
These variables aren't used in client side, so I removed NEXT_PUBLIC_
from them
CLOUDINARY_CLOUD_NAME="" | ||
CLOUDINARY_API_KEY="" | ||
CLOUDINARY_UPLOADS_FOLDER="" |
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.
it looks like throughout the examples you reference differently CLOUDINARY_UPLOADS_FOLDER vs NEXT_PUBLIC_CLOUDINARY_UPLOADS_FOLDER
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.
The reason I didn't put NEXT_PUBLIC_
in these is because these env variables are not used on the client side, so it's better if they are not exposed
tested both and seem to work well. push merging main to get rid of conflicts |
This PR updates the FormData and Route Handlers examples
nextjs-upload-formdata
demo will benextjs-route-handlers-upload
demo will beFormData
format to the route handler (app router) or api route (pages router)Some breaking changes
Environment variables are as follows now (update in deployment - if deployed)
nextjs-upload-formdata
nextjs-route-handlers-upload