Disable XLSX Preview on Alfresco Share

cancel
Showing results for 
Search instead for 
Did you mean: 
marcog
Partner

Disable XLSX Preview on Alfresco Share

Hello everybody.

I want to disable the visualization of .xlsx type documents in Alfresco Share 7.2. The thumbnail has already been successfully disabled, now what I want is to disable the document preview when I select it.

I don't want you to render it.

What I need is to disable the transform of xlsx files (they are big files) because they are taking more than 5 minutes to render and display in Share Web Preview, and this is leading to processing overhead in Alfresco.

Is there any way in alfresco-global.properties or share-config-custom about this?

Please, can anyone help me?

Marco

3 Replies
sanjaybandhniya
Intermediate

Re: Disable XLSX Preview on Alfresco Share

marcog
Partner

Re: Disable XLSX Preview on Alfresco Share

Hi, sorry.

Do you have a ideia of:

disable the transformation from Office formats to PDF - then, as a result, web preview will also not be shown

Thanks

4535992
Senior Member

Re: Disable XLSX Preview on Alfresco Share

For this use case maybe implement a Surf extension module using a sub-component + evaluator to conditionally remove the web-preview component for ignore the web preview only for big xlsx is the better thing todo.

Here the "no-webpreview-for-big-xlsx-extension.xml" code:

<extension>
    <modules>
        <module>
            <!-- https://hub.alfresco.com/t5/ecm-archive/document-preview-on-and-off-on-user-request/m-p/259355 -->
            <id>no-webpreview-for-big-xlsx-extension</id>
            <version>1.0</version>
            <auto-deploy>true</auto-deploy>
<!-- HERE PUT A EVALUATOR FOR ACTIVATE THIS ONLY FOR XLSX > 10 MB OR SOMETHING LIKE THAT --> <evaluator type="default.extensibility.evaluator"/> <configurations> <config evaluator="string-compare" condition="DocumentDetails"> <document-details> <!-- display web previewer on document details page, it should be enough but for some reason seem not to work, so i override the sub-component --> <display-web-preview>false</display-web-preview> </document-details> </config> </configurations> <components> <component> <scope>template</scope> <region-id>web-preview</region-id> <source-id>document-details</source-id> <sub-components> <sub-component id="default"> <evaluations> <evaluation id="hide"> <render>false</render> </evaluation> </evaluations> </sub-component> </sub-components> </component> </components> </module> </modules> </extension>

Then replace the default evaluator with a customized one.