In a wiki page, when I click on a link to a PDF file, the preview is not working:
However, I can download the PDF file and it is available in the page attachments list.
Any idea about how to restore the preview?
Observed issues are with PDF type attachments, JPEG and PNG images
The following appears in the
2015-02-17 07:48:56,813 ERROR [conversion-thread-3-internal] [conversion.impl.runnable.ConversionRunnable] doWork Format cannot be converted -- referer: http://testserver:8090/display/TS/Incident+and+Problemmanagement?preview=/17663912/17795772/How%20To%20Code%20In%20Java.pdf | url: /rest/documentConversion/0.1/conversion/convert/17795772/1 | userName: tester
SELECT * FROM CONTENTPROPERTIES WHERE PROPERTYNAME = 'MEDIA_TYPE' AND STRINGVAL LIKE '%pdf%'; SELECT * FROM CONTENTPROPERTIES WHERE PROPERTYNAME = 'MEDIA_TYPE' AND STRINGVAL LIKE '%pjpeg%'; SELECT * FROM CONTENTPROPERTIES WHERE PROPERTYNAME = 'MEDIA_TYPE' AND STRINGVAL LIKE '%x-png%';
The Content Type of the attachments are wrong
application/pdf' as how it should be, instead the Content Type is either in one of this format; 'pdf', '
image/pdf' or '
These values are already invalid before performing the upgrade.
For more information please refer to CONF-36666 - Unable to Preview PDF Attachment Link Due to Wrong MEDIA_TYPE After Upgrade RESOLVED .
Run the following SQL query:
For issues with PDF:
UPDATE contentproperties SET STRINGVAL = 'application/pdf' WHERE PROPERTYNAME = 'MEDIA_TYPE' AND STRINGVAL LIKE '%pdf%';
For issues with JPEG images:
UPDATE contentproperties SET stringval = replace(stringval, 'image/pjpeg', 'image/jpeg') WHERE PROPERTYNAME = 'MEDIA_TYPE';
For issues with PNG images:
UPDATE contentproperties SET stringval = replace(stringval, 'image/x-png', 'image/png') WHERE PROPERTYNAME = 'MEDIA_TYPE';
Flush your Confluence caches by navigating through Confluence Administration Panel >> Cache Management >> Flush All.
Best Regards, Damien.
Hmmm... just ran into this error in the Cloud instance of Confluence for PNG images that were working fine, but after I did an in-place update to one image ("Edit with... Preview (the Mac App). Make a change. Save. Update Confluence. See it on the page. Click PNG to see it larger... and boom. Error.
In fact, now all images on the page are not preview capable and must download. That's crappy.
I'm certainly not able to run SQL to check the DB for Cloud Confluence... and all steps I did were above...nothing crazy.
My Answer: Atlassian needs to review the process with us to find the regression bug that's causing the problem and fix Confluence.
when you insert a link to a file (not the interactive PDF macro), you can choose whether to display the file as a link or as a thumbnail
In the Edit mode, if it is showing as a thumbnail, just click or hover the mouse over the thumbnail and a pop up box will appear which toggles as below
Hey there! When you can pack so much information onto a Confluence page, it can be challenging to whittle down what’s most important. Here are a few of our favorite hacks for finding need-to-know i...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events