Task #20
openAdd Multiple images to Ads
0%
Description
Implement Functionality for users to upload, view, and manage multiple images for their ads.
Each ad can have multiple images, displayed in a specific order.
Users should be able to upload, remove, and reorder images before publishing the ad.
***ad_images_table
id (PK) – Unique identifier for each image
ad_id (FK ads.id) – Ad to which the image belongs
image_url – Path or URL of the uploaded image
sort_order – Order in which images are displayed for the ad
created_at – Timestamp when the image was uploaded
*Validations
*Each ad_id must exist in the ads table. Images cannot be added to non-existent ads.
*image_url is mandatory for every image.
*Only the following formats are allowed: jpg, jpeg, png.
*Maximum image size: 5 MB (adjust as per project requirement).
*Maximum number of images per ad: 10.
*sort_order must be unique per ad. No duplicate sort orders for the same ad.
*First uploaded image automatically gets sort_order = 1 if not provided.
*Users can delete or reorder images before the ad is published.
*Images can only be added if the ad status is draft, pending, or published.
*The first image in sort_order will be used as the main display image for listings.
Updated by Navyamol KB about 2 months ago
- Status changed from New to In Progress
Updated by Navyamol KB about 2 months ago
- Status changed from In Progress to Resolved