# Add files in the comments

**URL:** <https://kanboard.discourse.group/t/add-files-in-the-comments/232>\
**Category:** Open Discussions\
**Created:** [March 1, 2019, 8:14am UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232 "2019-03-01T08:14:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaroja4](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/jaroja4/32/97_2.png) [@jaroja4](https://kanboard.discourse.group/u/jaroja4)\
**Post date:** [March 1, 2019, 8:14am UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/1 "2019-03-01T08:14:08Z")

</div>

Hi.  
I would like to know if someone has tried to modify the code to be able to add pictures or files in the comments.  
Thank you

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [March 1, 2019, 4:03pm UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/2 "2019-03-01T16:03:46Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/e9bd7714a53e5ce75bc277315f75b909aa9531c1.png)

---

<div class="post-metadata">

**Author:** ![gerald2545](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/gerald2545/32/103_2.png) [@gerald2545](https://kanboard.discourse.group/u/gerald2545)\
**Post date:** [March 6, 2019, 8:15am UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/3 "2019-03-06T08:15:44Z")

</div>

how did you manage this Creecros? Is your image hosted on your server?  
same wish here : [https://github.com/kanboard/kanboard/issues/4146](https://github.com/kanboard/kanboard/issues/4146)

I believe it would be a really nice and useful functionality :  
we have to upload files (image or not) to tasks but we always have to refer to them to explain what is this file…being able to add (a) file(s) along with a new comment would be perfect

thank you

---

<div class="post-metadata">

**Author:** ![creecros](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/creecros/32/156_2.png) [@creecros](https://kanboard.discourse.group/u/creecros)\
**Post date:** [March 6, 2019, 11:12am UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/4 "2019-03-06T11:12:37Z")

</div>

Uploaded via task and then use markdown to show the uploaded image.

Think of the Attachments as a file repository for the task, and then in the comments section or even description, you use markdown to reference the files.

![image](https://global.discourse-cdn.com/free1/uploads/kanboard1/original/1X/0537ae5d22561dcae52dfbe5e6e89a4c36c94c78.png)

to reference with a download link use something like:

```auto
You can also include file references: [Download this file for your project][1]

[1]: https://projects.nachostudio.ml/?controller=FileViewerController&action=download&task_id=1&project_id=1&file_id=2

```

to show inline image use:

```auto
Why do you need to edit the code?

![](https://projects.nachostudio.ml/?controller=FileViewerController&action=image&file_id=1&project_id=1&task_id=1)

```

Take a quick look at Markdown syntax to discover all the possibilities.

---

<div class="post-metadata">

**Author:** ![renothing](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/renothing/32/342_2.png) [@renothing](https://kanboard.discourse.group/u/renothing)\
**Post date:** [June 15, 2019, 3:37pm UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/5 "2019-06-15T15:37:28Z")

</div>

I thinks this feature can be implemented in core module `task_has_files`, just need add new column `comment_id`. it’s task file only when comment\_id=0, otherwise comment file. but if we want use foreign key for consistency constraint  
, need a new model `CommentFileModel`

it’s well used in many scenes, like support ticket system for customer. especially when user reply task with attachments via email.  
also in usually we need comment with files/images inline too.

maybe need some rework on editor, integration screenshot and attachment support. just like gmail did in their editor. very usefull for common scenes. there is one I mentioned it [Replace current editor](https://kanboard.discourse.group/t/replace-current-editor/445/2).

@fred how about your opinion?

---

<div class="post-metadata">

**Author:** ![micker](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/micker/32/108_2.png) [@micker](https://kanboard.discourse.group/u/micker)\
**Post date:** [June 14, 2022, 10:31am UTC](https://kanboard.discourse.group/t/add-files-in-the-comments/232/6 "2022-06-14T10:31:09Z")

</div>

its realy interessting work for me :

- tag all @all for notify all user of projet
- copy past image directly in comment
- pin comment to display it on top of task  
can be realy usefull
