Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in issues (copy/paste and reference) #3032

Closed
svarlamov opened this issue Nov 30, 2017 · 3 comments · Fixed by #5317
Closed

Images in issues (copy/paste and reference) #3032

svarlamov opened this issue Nov 30, 2017 · 3 comments · Fixed by #5317
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@svarlamov
Copy link
Contributor

  • Gitea version (or commit ref): dab2b35

Description

At the moment, there's no way to cut and paste an image into an issue on Gitea, whereas on Github we can comfortably do that. It's critical to the workflow of any team that is developing web applications to be able to cut and paste screenshots directly into the issue.

Second, we've been noticing that (a) the filenames of attachments change on upload, so there is no way to say, "hey check out file myscreen.png" and; (b) there is no way to point -- like we do in Github issues -- to files, inline with your issue text. The final outcome here is that there's no effective way to point someone to an attachment on the issue.

Perhaps we can implement more of a Github approach where as you upload attachments they are inlined as links? This was very useful in our previous workflows.

@lunny lunny added the type/enhancement An improvement of existing functionality label Nov 30, 2017
@SnowMB
Copy link
Contributor

SnowMB commented Nov 30, 2017

(b) is not entirely true. There is a way to inline images, but it's not very comfortable. When you upload an image to an issue it gets some random url (or hash idk) <site>/attachments/<url>. You can create your issue/ comment and upload the image with it. After submitting you can get the image url by clicking on it. Then edit your comment and use standard markdown to inline the image with your url

![](<site>/attachments/<url>) 

where you want to inline the image.

But I would also like to see your suggested improvements 😄

@svarlamov
Copy link
Contributor Author

@SnowMB Agreed - so since we do get that URL on upload, we should be able to implement this quite simply as a pure client-side fix. Where:

i. On upload, when the file ext matches an img regexp, it could automatically paste that where your cursor was last.

ii. On paste, we could have some JS that would upload it using the same upload method that's called when you upload an img. I believe that Gitea uses a standard JS lib for the drag-n-drop -- maybe that already has this functionality

I will look into this and try to figure out what work would be required to get at least the beginnings of this working -- more or less inline with the way that GitHub does it.

@remydev
Copy link

remydev commented Nov 11, 2018

Little Bounty ;)

@lafriks lafriks added this to the 1.7.0 milestone Nov 11, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants