This pull request introduces several changes aimed at integrating Cloudinary for image uploads within our Next.js application. It modifies the user's profile information retrieval to exclude the imageUrl from the response, updates the user signup process to accept an imageUrl as part of the user's data, and adds a new route for handling image uploads to Cloudinary.
Summary
Updated the GET method in src/app/api/users/me/route.ts to exclude imageUrl from the user data fetched.
Modified the POST method in src/app/api/users/signup/route.ts to accept an imageUrl parameter during user registration. The imageUrl is optional and defaults to an empty string if not provided.
Added a new route src/app/api/users/upload/route.ts for handling image uploads. This route uses Cloudinary's API to upload images and returns the URL of the uploaded image.
Configured Cloudinary in the new upload route using environment variables for cloud_name, api_key, and api_secret.
Utilized formidable for parsing incoming form data, including the image file to be uploaded to Cloudinary.
Fixes #17.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces several changes aimed at integrating Cloudinary for image uploads within our Next.js application. It modifies the user's profile information retrieval to exclude the
imageUrl
from the response, updates the user signup process to accept animageUrl
as part of the user's data, and adds a new route for handling image uploads to Cloudinary.Summary
GET
method insrc/app/api/users/me/route.ts
to excludeimageUrl
from the user data fetched.POST
method insrc/app/api/users/signup/route.ts
to accept animageUrl
parameter during user registration. TheimageUrl
is optional and defaults to an empty string if not provided.src/app/api/users/upload/route.ts
for handling image uploads. This route uses Cloudinary's API to upload images and returns the URL of the uploaded image.cloud_name
,api_key
, andapi_secret
.formidable
for parsing incoming form data, including the image file to be uploaded to Cloudinary.Fixes #17.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.