Skip to content

[Feature]: add handler for Uploading Display picture for Groups #27

@aritradevelops

Description

@aritradevelops

Component

Backend (Server)

Priority

Critical (Essential for core functionality)

Problem Statement

introduce a new handler to upload images for group channels.

Proposed Solution

  1. modify the ChannelController and add a new method to parse the raw bytes from the client and upload it using MediaProvider into /group-pictures directory.
  2. Then update the metadata.image column of the ChannelTable with the url recieved from the [MediaProvider] (https://github.com/aritradevelops/hush/blob/main/server/src/providers/media/index.ts)

Notes:

  1. Take inspiration for PR Feature/dp upload feature #26 which does simillar thing.
  2. You don't have to have access to AWS S3, you can use the LocalFSProvider which is enabled by default in the development environment.
  3. even on the smallest queries you have feel free drop a comment.

Alternatives Considered

No response

Use Cases

  • better UX

Mockups/Designs

I would really like if you can do it in the existing way, that is the client directly sends the raw image bytes in the request body as application/octet-stream and any additional data required like mime-type etc. in the query parameters. because if you want send multipart-form data from client you will be needing some external dependencies like multer or busybox which is unneccesary in our case.

Estimated Complexity

Medium (Moderate effort)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions