Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Image Upload Functionality
Overview
This pull request introduces image upload functionality to the website, enhancing the user experience by allowing vendors to add images to their dishes. The implementation includes schema modifications, the integration of Cloudinary for image storage, a reusable image uploader component, and updates to the global state management and backend action for posting dishes.
Changes Made
1. Image Upload Functionality
2. Schema Updates
Dish
model to include animages
array, establishing a relationship with theImage
model. This allows each Dish to have multiple associated images.3. Cloudinary Integration
next.config.js
) to include necessary Cloudinary settings for seamless integration.4. Reusable Image Uploader Component
5. Global State Modifications
6. Backend Action Adjustments
7. New Form Page with Image Uploader
Testing
Conclusion
This enhancement significantly improves the new Dish submission process, making it easier for vendors to add visual content to their dishes, thereby improving the overall user experience on the platform.
PS: I have also pushed a well descriptive .env.example so that other contributors can setup the project easily
closes #241