spacebarchat / spacebarchat/server

Admin API Route: /policies/attachments

Open
#378 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Module: Admin API Module: API Route
Dominant language
TypeScript
Stars
2.2k
Forks
323
Avg merge
14h 48m
Merged PRs (30d)
4

Description

This policy will control the size and file types of attachments.

  • id: policy ID, previous revisions retrievable by GET /policies/attachments/:id
  • allowed_types: map of allowed MIME types (globbing is allowed) to maximum sizes in octets, if a key has a null size, it follows the general maximum size
  • denied_types: list of denied MIME types (globbing is allowed)
  • whitelist: if true, everything except allowed_types are denied, and denied_types are subtracted from allowed_types; else, everything except denied_types are allowed, and allowed_types are subtracted from denied_types
  • cdn_endpoint: fully qualified domain name plus path to the CDN endpoint
  • size: maximum size in octets

Sub-tasks:

  • Retrieve single: GET /policies/attachments/:id
  • Retrieve all: GET /policies/attachments
  • Create: POST /policies/attachments/:id
  • Update single: PATCH /policies/attachments/:id
  • Atomic swap: TRANSPOSE /policies/attachment/:id /policies/attachment/:id
  • Remove single: DELETE /policies/attachments/:id

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed admin API routes and the attachment policy fields in this issue, including the revision, filtering, and atomic-swap requirements. Done means implementing and verifying retrieval, creation, update, swap, and deletion for the attachment policy endpoints, with the documented path and field behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.