Description
Problem
The Talawa Admin currently uses Base64 encoding for images, leading to increased payload size, performance issues, and inefficient storage.
Solution
Replace Base64-based image handling with MinIO client integration. Images should be uploaded to MinIO, and only the file URL should be stored in the database.
Alternatives Considered
- Storing images in a local filesystem (scalability issues).
- Using AWS S3 (MinIO offers a self-hosted alternative).
Approach
- Identify and replace Base64 encoding with MinIO uploads.
- Store only MinIO file URLs instead of Base64 strings.
- Implement proper error handling and security measures.
Additional Context
This will optimize image storage, improve performance, and reduce bandwidth usage.
NOTE
-
We recently discovered a flaw in the code base where there are some XSS and CORS vulnerabilities. This occurs when the API and Admin servers run on different machines.
-
You will notice this if you configure your Admin app on your local machine to use the API running on https://test.talawa.io/graphql.
-
The errors in your browser will look like this:
-
As part of this issue you will need to ensure that the browser only interacts with the API through the Admin server and never with the API direclty.
Metadata
Metadata
Assignees
Type
Projects
Status