Codelabz
Codelabz copied to clipboard
[ Feat : Introduce Image Upload Option for Tutorials ]
Description
In this pull request, I implemented the feature to upload images for tutorials. The changes include the following :
- Modified the tutorial creation process to handle image uploads.
- Implemented a file input in the tutorial creation form to allow users to select an image.
- Utilized Firebase Storage to store the uploaded image.
- Retrieved and stored the image URL in the
featured_image
field of the tutorial document.
Related Issue
Closes #1029
Motivation and Context
This change is required to introduce the ability to upload images in tutorials. The featured_image
field is added during document creation and is now populated with the image URL after storing the image to Firebase.
How Has This Been Tested?
I have tested these changes in the following way:
- [x] Clicked on the "Upload Image" option
- [x] Selected an image file using the file picker
- [x] Verified that the
featured_image
field is populated with the correct URL after storing the image
Video :
https://github.com/scorelab/Codelabz/assets/123815256/93708b62-eb5a-4272-8b1f-8296ea2c6ff4
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.