Project

General

Profile

Actions

Task #55

open

Media Gallery Management

Added by Dana Basheer about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
High
Assignee:
Start date:
01/21/2026
Due date:
01/21/2026 (44 days late)
% Done:

0%

Estimated time:

Description

Develop a media management module that allows admin users to upload, organize, and manage images and videos related to MLA profiles, development works, and future plans. The system should link each media item to its respective module, display captions in Malayalam, and ensure secure storage and retrieval of media files for public viewing.

***Table: gallaries
Field Type Description
id BIGINT (PK) Media ID
related_type ENUM('DEVELOPMENT','PLAN','MLA') Linked module
related_id BIGINT Related record ID
media_type ENUM('IMAGE','VIDEO') Media type
file_url TEXT File URL
caption_ml VARCHAR(255) Caption in Malayalam
uploaded_by BIGINT (FK → users.id) Uploaded admin
created_at TIMESTAMP Upload date

***Validations

*related_type must be one of DEVELOPMENT, PLAN, or MLA

*related_id must exist in the corresponding table based on related_type

*media_type must be either IMAGE or VIDEO

*file_url must be a valid file path or URL

*Only users with role ADMIN/STAFF can upload media

*caption_ml must be in Malayalam (Unicode validation)

*Image and video file size must be within defined limits

*Only allowed file formats can be uploaded (JPG, PNG, MP4, etc.)

*Media records cannot be created for inactive constituencies

*Deleting media must remove both the database record and the stored file

Actions

Also available in: Atom PDF