# Feature COMMS-405 - BlockNote: Does not handle uploading attachments

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-405

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 17.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

| ID | Subject | Status | Decision |
| --- | --- | --- | --- |
| COMMS-445 | Should we implement a new API endpoint for uploading attachments? | decided | We use the existing API endpoint and use the prepare flow for direct upload to an external server |
| COMMS-447 | How do we want to handle file attachments uploaded through the editor? | decided | For V1 of collaborative documents, we show all files in the Files Tab |

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Modules and project features / Text editor / BlockNoteJS |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Judith Roth |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

As a user editing a document  
I want to be able to drag a file in the editor to upload and inline use it.

### Acceptance Criteria

### 

  - When a user drags a file onto the blocknote editor, it is uploaded and used

  - A user is able to upload an image and embed a file in the blocknote editor

### 

### 

#### Not part of this (tackled elsewhere):

  - Make files that are uploaded appear in the "Files" Tab (this is handeled in <mention class="mention" data-id="67424" data-type="work_package" data-text="#67424">\#67424</mention> )

  - Make files block in the Blocknote Editor look nice (this is handeled in <mention class="mention" data-id="67740" data-type="work_package" data-text="#67740">\#67740</mention> )

<br>

TODO:

- [x] Implement file upload to server flow
- [x] Add dev docker MinIO setup
- [x] Implement file upload to external storage flow
- [ ] Error handling (when user tries to upload a file type that is not whitelisted) =\> See <mention class="mention" data-id="68558" data-type="work_package" data-text="#68558">\#68558</mention> 
- [x] Clean up Code
- [x] Check if the prepare flow also works for the upload to the server (Answer: No, needs refactoring)
- [x] Add Tests
