Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

view-file preview not updating after page updated via REST

M_S_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2017

I have updated a larger number of Confluence pages to use the view-file macro to show a PDF attachment. This was done via REST as it was basically a find-and-replace through many pages.

The updated pages show the placehoder for the view-file, but no actual preview - more a generic symbol/image. 

Is this a known issue caused by the update via REST? Can Confluence be triggered to generate the previews without going through each page?

2 answers

0 votes
M_S_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2017

I used REST to iterate a larger set of similar pages to update/harmonize these. Specifically, the update transitioned to the new view-file macro. 

Only the storage format was updated. The pages already had the files attached.

The REST request was basically a PUT on .../content/{pageid} with body

{ id = 2424927, type = "page", title = "...", version = {{ number = 3, message = macro content migration }}, body = {{ storage = { value = ... , representation = storage } }} }

so this should be nothing unusual.

However, looking at the page shows this:

confluence-preview-issue.png

However, some actions may suddenly trigger the preview thumbnail to render, for example, click edit page (do not actually change anything) +preview + cancel.

The issue is true for all pages involving many different pdfs (and actually also some jpegs). 

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2017

Please let me know more:

  • The REST syntax you used to update the pages.
  • Were the pages previewing a different PDF before or did you attach the PDF with REST?
  • Are all the pages displaying the same PDF?
  • Please attach a screen shot of the placeholder.

Please verify that you are using the view-file macro and not the older viewpdf macro. The new File Preview macro is called view-file in the storage format, which can be confusing, as you can see from: How to replace old View File macros with the new File Preview macro

I was not able to find a known issue for the REST update causing an issue with previewing files, though I did find this bug: viewfile not able to view pdf document. I am hopeful that the bug is not relevant to this case. If you manually add the same PDF to a test page, can you preview it then?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events