beep-industries / beep-industries/client

Implementation of attachments

Open
#101 0 comments 0 reactions 1 assignee Claimed by @Giada-De-Martino View on GitHub
Dominant language
TypeScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Background:
Nothing as been done yet to support attachments on the frontend.

Issue:
We want to implement the attachments to messages

Expected Behavior:

## SENDING ATTACHMENTS:

Image

when clicking the "+" button, it should send a request to the message service on POST /messages/attachment.
it will return :
{ "id": url", url: ""}
- Then the frontend should upload the file to the url endpoint and save the id in a state,
- It should not be able to send a message during the upload
- After the upload of all the files, we can send the message
- When sending the message, it should contains the following payload :
{
"attachments": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6", "...."],
"channel_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"content": "string",
"reply_to_message_id": null
}

## RECEIVING ATTACHMENTS:

when receiving the list of messages, it will be like this:
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"attachments": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "string"
},
.....................
],
"author_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"channel_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"content": "string",
"created_at": "2026-01-29T09:27:47.140Z",
"is_pinned": true,
"reply_to_message_id": null,
"updated_at": "2026-01-29T09:27:47.140Z"
}
],
"page": 0,
"total": 0
}

- It should display an image with the url provided if it is an image, otherwise, it should display a link to download the file using the url,

The frontend design is not made, try to something pretty :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.