# Where's the code that puts the uploaded file description into the editor?

**URL:** <https://meta.discourse.org/t/wheres-the-code-that-puts-the-uploaded-file-description-into-the-editor/215271>\
**Category:** Development\
**Created:** [January 18, 2022, 9:51pm UTC](https://meta.discourse.org/t/wheres-the-code-that-puts-the-uploaded-file-description-into-the-editor/215271 "2022-01-18T21:51:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)\
**Post date:** [January 18, 2022, 9:51pm UTC](https://meta.discourse.org/t/wheres-the-code-that-puts-the-uploaded-file-description-into-the-editor/215271/1 "2022-01-18T21:51:32Z")

</div>

Hi All. I am experimenting with the text that is displayed in the composer editor’s textarea when a file is uploaded. And I’m trying to figure out how the code works. When a user hits upload, and uploads a file (‘Cool-File.txt’), where is the code that puts the reference into the d-editor textarea?

For example, the text in the textarea that would read:  
`[Cool-File.txt|attachment](upload://8htnahUHYHnB11M.txt) (21.1 KB)`

Where is the code that registers the upload event and inserts this text?

* * *

I’ve taken a look through the composer-editor.js methods like “getUploadMarkdown(upload)”, and the related methods like “attachmentMarkdown(upload)” in uploads.js. But changing these doesn’t seem to change anything.

---

_[View the full topic](https://meta.discourse.org/t/wheres-the-code-that-puts-the-uploaded-file-description-into-the-editor/215271)._
