Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
6.3.3, 6.4.1, 6.4.2, 6.13.6, 7.3.5, 7.19.4
-
13
-
Severity 2 - Major
-
5
-
Description
STEPS TO REPLICATE
- Navigate to Confluence Page > Attachments.
- Attach first version of JPG image in the attachment.
- Attach second version of the JPG image in the attachment with the same attachment name.
- Click to preview the first version of the JPG image.
EXPECTED BEHAVIOUR
Confluence preview the first version of the JPG image.
ACTUAL BEHAVIOUR
Confluence preview the second version (latest) of the JPG image but the URL is pointing to version=1:
<BASE_URL>/download/attachments/1966087/example.jpg?version=1&modificationDate=1509703152000&api=v2
WORKAROUND
1 Convert the attachment into .png and reattach them.
2. There is another workaround by manipulating the contentproperties
- Note the CONTENTID of the JPG image
select contentid from content where title = '<JPG attachment title>' and contenttype='ATTACHMENT'
- Update the CONTENT table by replacing .jpg in the title by .png
update content set title='<title of attachment>.png',lowertitle='<title of attachment>.png' where contentid in (select contentid from content where title = '<JPG attachment title>' and contenttype='ATTACHMENT')
- Update the CONTENTPROPERTIES table to change the MEDIATYPE property
update contentproperties set stringval='image/png' where propertyname='MEDIA_TYPE' and contentid in (select contentid from content where title = '<JPG attachment title>' and contenttype='ATTACHMENT')
- Flush the Cache or Restart Confluence to see the changes in UI
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first
NOTE
This bug currently affect only .jpg attachment
Attachments
Issue Links
- mentioned in
-
Page Loading...