Feature request : ability to upload images and insert them right away in new messages #5980

Closed
opened 2025-11-02 06:41:52 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @tcharlss on GitHub (Sep 10, 2020).

  • Gitea version: 1.12.1
  • Git version: ?
  • Operating system: ?
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: ?

Description

Say you're typing a new message and you want to insert an image in the text, ie. ![](path/to/my/image.jpg).
You want the image to be hosted on the gitea server, so you upload it via the widget at the bottom.

Problem is, after the upload you don't have access to the URL of the image, so you can't insert it yet.
You first have to submit the message, than only are you able to copy the image URL by inspecting the attached files, edit the message, and finally insert it.

It would be nice if the upload widget displayed the files URL, that way it could be done right away.
Well, that is, if the widget uploads the files directly and not after the message is submitted, I'm not entirely sure how it works :)

Originally created by @tcharlss on GitHub (Sep 10, 2020). - Gitea version: 1.12.1 - Git version: ? - Operating system: ? - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ? ## Description Say you're typing a new message and you want to insert an image in the text, ie. `![](path/to/my/image.jpg)`. You want the image to be hosted on the gitea server, so you upload it via the widget at the bottom. Problem is, after the upload you don't have access to the URL of the image, so you can't insert it yet. You first have to submit the message, than only are you able to copy the image URL by inspecting the attached files, edit the message, and finally insert it. It would be nice if the upload widget displayed the files URL, that way it could be done right away. Well, that is, if the widget uploads the files directly and not after the message is submitted, I'm not entirely sure how it works :)
GiteaMirror added the topic/uitype/enhancementtopic/ui-interaction labels 2025-11-02 06:41:52 -06:00
Author
Owner

@tcharlss commented on GitHub (Sep 10, 2020):

And here's a screenshot of the widget, just to be clear: we can only see the file name, not the full path on the server, so at this stage it is impossible to insert the image in text yet.

gitea_upload_widget

@tcharlss commented on GitHub (Sep 10, 2020): And here's a screenshot of the widget, just to be clear: we can only see the file name, not the full path on the server, so at this stage it is impossible to insert the image in text yet. ![gitea_upload_widget](https://user-images.githubusercontent.com/9882128/92728651-69329c80-f371-11ea-8811-f410cdb9f997.png)
Author
Owner

@davidak commented on GitHub (Oct 21, 2020):

This is actually one of the biggest issues i have with Gitea!

I want to have the images next to the text where i explain what is wrong and actually display them in the browser (not just their name).

It should just work as on GitHub, that is perfect. Drag and drop them into the text where you want to have them.

Here is an example why it's currently bad:

GitHub: https://github.com/davidak/test/issues/1
Imported to Gitea: https://try.gitea.io/davidak/1/issues/1
Native Gitea: https://try.gitea.io/davidak/1/issues/2 (7 images i have added to the issue are actually missing)

@davidak commented on GitHub (Oct 21, 2020): This is actually one of the biggest issues i have with Gitea! I want to have the images next to the text where i explain what is wrong and actually display them in the browser (not just their name). It should just work as on GitHub, that is perfect. Drag and drop them into the text where you want to have them. Here is an example why it's currently bad: GitHub: https://github.com/davidak/test/issues/1 Imported to Gitea: https://try.gitea.io/davidak/1/issues/1 Native Gitea: https://try.gitea.io/davidak/1/issues/2 (7 images i have added to the issue are actually missing)
Author
Owner

@r10r commented on GitHub (Nov 15, 2022):

I'll second that! That would improve usability a lot, since attaching images is a very common task.

@r10r commented on GitHub (Nov 15, 2022): I'll second that! That would improve usability a lot, since attaching images is a very common task.
Author
Owner

@HammyHavoc commented on GitHub (Dec 1, 2022):

Would love to be able to do this. Would make reporting bugs during game dev requiring a sequence of images to demonstrate the issue much more easily understood within the context of the description for each step to replicate it.

@HammyHavoc commented on GitHub (Dec 1, 2022): Would love to be able to do this. Would make reporting bugs during game dev requiring a sequence of images to demonstrate the issue much more easily understood within the context of the description for each step to replicate it.
Author
Owner

@shalak commented on GitHub (May 3, 2023):

I believe this feature is already present in Gitea Version: 1.17.3, is it not?

@shalak commented on GitHub (May 3, 2023): I believe this feature is already present in Gitea Version: 1.17.3, is it not?
Author
Owner

@shalak commented on GitHub (May 3, 2023):

Huh, I noticed that it does work then creating a PR or adding a new comment. But with replying to existing comment - it doesn't work... Anybody else has this issue?

@shalak commented on GitHub (May 3, 2023): Huh, I noticed that it does work then creating a PR or adding a new comment. But with replying to existing comment - it doesn't work... Anybody else has this issue?
Author
Owner

@zeripath commented on GitHub (May 3, 2023):

@shalak could you show us a screenshot?

@zeripath commented on GitHub (May 3, 2023): @shalak could you show us a screenshot?
Author
Owner

@shalak commented on GitHub (May 3, 2023):

@shalak could you show us a screenshot?

Huh, apologies, I was mistaken - it appears that the pasting images directly from clipboard works in PRs for comments in "Conversation" (e.g. https://gitea.mydomain.com/user/repo/pulls/1), but does not work in the "Files Changed" page (e.g. https://gitea.mydomain.com/user/repo/pulls/1/files)

But that applies not only to pasting from clipboard, but for attaching images overall.

@shalak commented on GitHub (May 3, 2023): > @shalak could you show us a screenshot? Huh, apologies, I was mistaken - it appears that the pasting images directly from clipboard works in PRs for comments in "Conversation" (e.g. `https://gitea.mydomain.com/user/repo/pulls/1`), but does not work in the "Files Changed" page (e.g. `https://gitea.mydomain.com/user/repo/pulls/1/files`) But that applies not only to pasting from clipboard, but for attaching images overall.
Author
Owner

@wxiaoguang commented on GitHub (Jun 27, 2024):

After many refactoring PRs, it is implemented in main branch and will be available in next release (1.23). You could also use main-nightly build to test the enhancement.

@wxiaoguang commented on GitHub (Jun 27, 2024): After many refactoring PRs, it is implemented in main branch and will be available in next release (1.23). You could also use main-nightly build to test the enhancement.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5980