#3708 Image attachment feature can cause loss of data
Opened 2 years ago by netvor. Modified 2 years ago

The way images are apparently supposed to work in Issues is pretty confusing. As I understood it, you're supposed to use Browse button to select the image, then finish the text and click Create Issue, and it's after that moment that the file really gets uploaded.

This is confusing and inconsistent with how eg. github or gitlab work. In the other forges:

  • The image link is inserted into the text, so I'm given opportunity to work it inside the text, ie. move it around and edit text around it.

  • I can upload several images, then do the above with them, including switching the order.

  • I can upload image and delete it from the disk.

  • I can upload image but then decide not to include it at all (eg. if I realize I uploaded wrong one, or that it's actually not needed.)

Today I tried to file issue with single image, but after using Browse button, I only got this <!!image> pseudo-tag in the text. This is already confusing, as the tag clearly does not identify the actual image. (This would become obvious if I uploaded 2 images: I would not even be able to discern one from another.)

So I thought, "well, image attachements are broken", so I decided to upload the image to my own VPS and link it. I went with that (ie. scp, rm), and eventually I finished polishing the text and was ready to hit Submit.

BUT, turns out that this failed with some browser error indicating that the file is missing. I figured out that the browser wanted to upload the image on Submit, despite the fact that I deleted the <!!image> tag (I assumed that's the only control I had over the attachment). This of course could not succeed because I already deleted it.

Sadly this error was an "error page", covering the whole view page, so all I could do was hit Back and .... I was back to the Issues list, ans the text of the issue was lost. (Luckily I still had it in clipboard.)

--

Now, I understand from Pagure POV, dealing safely with image uploads is not easy, but if only way is to have user to go through this hassle, then well, ok, but it should be obvious from the UI that this is needed. Also user should have control of the attachments' placement within the text, and of their being uploaded---before clicking Create Issue.


Login to comment on this ticket.

Metadata