Skip to content

NoMongo: Replace Base64 Storage with MinIO Client in AdvertisementRegister.tsx #3717

Open
@NishantSinghhhhh

Description

@NishantSinghhhhh

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

  1. Identify and replace Base64 encoding with MinIO uploads.
  2. Store only MinIO file URLs instead of Base64 strings.
  3. Implement proper error handling and security measures.

Additional Context
This will optimize image storage, improve performance, and reduce bandwidth usage.


NOTE

  1. 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.

  2. 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.

  3. The errors in your browser will look like this:

    Image

  4. 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

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions