Confluence failed to generate file preview after editing with Companion app
Asked by Ignas Selvestravi?ius:

Here is the deal:

1. I upload the word file to confluence page - preview works fine
2. I edit the file with the help of a Atlassian Companion app - it saves/uploads the file without a problem
3. **The problem** emerges after I save/upload the file and go back to page view. Confluence cannot generate preview no more for the file that has been edited. It shows the error message "Something went wrong. We couldn't generate a preview for this file." **Disclaimer**: if I edit another file on the page, the previous edited file goes back to normal, no problam previewing it.
4. If I open the page's attachements I can view the files without any problems.

Below I have attached two pictures - one shows what I see after I save the file, the other shows the error message after I press on the file.

Software: Windows 10, Chrome Version 95, Confluence Cloud

![Failed to generate preview 1.png](/t5/image/serverpage/image-id/168683iA500A4AF36627C7A/image-size/large?v=v2&px=999 "Failed to generate preview 1.png")![Failed to generate preview 2.png](/t5/image/serverpage/image-id/168682i1F564FB29EC42336/image-size/large?v=v2&px=999 "Failed to generate preview 2.png")


Answers:
author: Shannon S
body: Hi Ignas,

Welcome to the Atlassian community, and thank you for reporting this to us. I understand after you edit a Confluence page attachment in the Companion App, the preview breaks.

Can you confirm if this page is on the legacy editor or the new editor? You can check [Convert pages to the new editor](https://support.atlassian.com/confluence-cloud/docs/convert-pages-to-the-new-editor/) to learn the difference visually.

Secondly, does it happen with any document type or only specific ones?

I hope to hear from you soon!

Take care,

Shannon

comments: author: Stefan J?ger
body: Hi Shannon,

I see the same behaivor with an Excel-sheet.

And it seems that I'm using the new editor.

Cheers, Stefan


author: Shannon S
body: Hi Stefan,

Thank you for confirming you're having the same issue too. I'm so sorry about the trouble this is causing you.

We will want to see the Excel document and the page to see why this might be happening. Can you [raise a support ticket](https://support.atlassian.com/contact/) and attach the document as an example?

If you have any trouble creating a ticket, please let me know, and I can help you out.

Shannon \| Atlassian Community Support


author: Ignas Selvestravi?ius
body: [@Shannon S](/t5/user/viewprofilepage/user-id/510046) sorry for late answer. The problem is with both excel and word documents; I did not test the other document types. I attach the picture below, where from left to right: edited excel file, unedited docx file, edited docx file. When pressed it fails to generate preview.

Also, I am confirming that the page itself is edited in new editor, not legacy.

![test.png](https://community.atlassian.com/t5/image/serverpage/image-id/174054iEA5A0342B9938778/image-size/large?v=v2&px=999 "test.png")


author: Shannon S
body: Hi Ignas,

Thank you for confirming. We'd like to take a look at this, so can you have your site admin raise a ticket at [support.atlassian.com](https://support.atlassian.com/contact/)? Please let me know if you have any trouble with that.

Thanks for your help.

Take care,

Shannon \| Atlassian Community Support


author: Ignas Selvestravi?ius
body: Shannon,

Thank you for you answer. I found there is already a bug registered here <https://jira.atlassian.com/browse/CONFCLOUD-72339> and registered on my side as well with the link in already registered issue.

Have a great day!


author: Shannon S
body: Hello Ignas,

Thank you for sharing the bug and confirming it's the same behavior you're experiencing. I'll include a link to this Community post in the internal notes for the developers.

Take care, and I hope you have a pleasant rest of your week.

Shannon


author: Tony
body: Having the same "We couldn't generate a preview for this file." with office documents after updating them with companion. Has anyone managed to resolve this? Could be a deal breaker for us.


author: Shannon S
body: Hi [@Tony](/t5/user/viewprofilepage/user-id/4785879)

We reported this issue in the bug Ignas shared. Please follow the ticket [CONFCLOUD-72339](https://jira.atlassian.com/browse/CONFCLOUD-72339) for updates on its resolution.

In the meantime, you can store the attachments on Google Drive. So, when you paste a Google Drive link into the page, you'll have an option to display embedded documents.

I hope that helps!

Take care,

Shannon \| Atlassian Community Support


author: Mark Lanham
body: I've been experiencing the same issue with some screenshots (PNGs) I've been taking on my Macbook. If I create a new Confluence doc and add some screenshots from my machine and then publish the article I can see the images ok. But if I delete the images from my desktop (which is where I dragged them in from) the images then break in Confluence.

I tried doing a hard refresh in the browser and the images then showed again. It seems Confluence is caching the images initially from the original location (my desktop) which is why they weren't showing once I deleted them from my machine.

I just needed to hit CMD+SHIFT+R.

comments: author: Ignas Selvestravi?ius
body: Thank you for your insights. Please suggest your workaround here <https://jira.atlassian.com/browse/CONFCLOUD-72339>


author: Ignas Selvestravi?ius
body: For anyone who stumbles upon this page in the future, there is a bug already raised on this issue <https://jira.atlassian.com/browse/CONFCLOUD-72339>


Tags: companion-app

confluence-cloud