cloudinary-examples icon indicating copy to clipboard operation
cloudinary-examples copied to clipboard

Update FormData and route handlers examples

Open max-programming opened this issue 1 year ago • 4 comments

This PR updates the FormData and Route Handlers examples

  • nextjs-upload-formdata demo will be

    • generating the signature using API route/route handlers
    • uploading the image from the frontend
  • nextjs-route-handlers-upload demo will be

    • Sending the image in FormData 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

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=""
NEXT_PUBLIC_CLOUDINARY_API_KEY=""
NEXT_PUBLIC_CLOUDINARY_UPLOADS_FOLDER=""

CLOUDINARY_API_SECRET=""

nextjs-route-handlers-upload

CLOUDINARY_CLOUD_NAME=""
CLOUDINARY_API_KEY=""
CLOUDINARY_UPLOADS_FOLDER=""
CLOUDINARY_API_SECRET=""

max-programming avatar Sep 06 '24 17:09 max-programming

@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.

vercel[bot] avatar Sep 06 '24 17:09 vercel[bot]

hey is this still a WIP per your description?

colbyfayock avatar Sep 17 '24 16:09 colbyfayock

@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

max-programming avatar Sep 19 '24 13:09 max-programming

tested both and seem to work well. push merging main to get rid of conflicts

colbyfayock avatar Sep 26 '24 14:09 colbyfayock

thanks @max-programming

colbyfayock avatar Oct 17 '24 20:10 colbyfayock