Is this possible ? Additional interactive editing dialog on file upload in create topic dialog

For a forum I am working on, I am looking to add a complex custom behaviour on the create topic dialog. In this niche forum, every topic revolves around a single image/PDF file.

In short, I want to programmatically modify that file, when user uploads a file, but interactively.

What I mean is, I am looking to create plugin for this behaviour: (assume this is desktop focussed application):

  1. When user uploads a file, the server render a custom HTML response from the backend.
  2. I want to create a new dialog for this custom HTML or handlebar. This custom HTML contains editable HTML or embelements like input fields which the user can modify or add to.
  3. User can make changes and finally save these modifications. These modifications will be used to modify the original file and then I want to keep the modified file only as the attachment.
  4. Then, they can modify other details like description in the create new topic dialog. Once they click on create topic, I save the other details of topic, and use the modified attachment, so when the topic is created, everyone sees the modified file.

Modifying file upload in backend is not a concern. In fact, it seems the backend portions are manageable. My concern at this point is creating the new interactive dialog on the UI. Is this something that I can do by creating a plugin ? Or is it too much of a customization that discourse cannot support at this point.

The forum would actually revolve around this behaviour, so this is unfortunately a must have for me.

Any help or guidance is appreciated. Thank you!

1 Like