share-extras / media-viewers

Enhanced document previews for a range of different document and media types, plus a dashlet allowing any content item to be displayed on a site dashboard.
Apache License 2.0
29 stars 23 forks source link

PdfJs Viewer is used for image files and other inappropriate content on 4.2.d #6

Closed wabson closed 11 years ago

wabson commented 11 years ago

As discovered by @davidyg in issue 4 the repository config supplied to configure FFmpeg conversions now has the unfortunate side-effect of configuring all mimetype to be transformable to all other mimetypes in the system, with the result that when enabled, the PdfJs viewer is used by Share to view all content types.

wabson commented 11 years ago

Upstream Alfresco issue - https://issues.alfresco.com/jira/browse/ALF-19057

wabson commented 11 years ago

At present the only workaround for this issue is to not add the JAR file to the Alfresco webapp, i.e. deploy it only to tomcat/webapps/share/WEB-INF/lib rather than to tomcat/shared/lib. However this will obviously prevent PDF, video and audio previews that require a transformation from working.

I'll update this issue with any further info.

davidyg commented 11 years ago

Just a comment. I'm the user who reported this issue:

https://issues.alfresco.com/jira/browse/ALF-19056

Which was related to the one reported by you:

https://issues.alfresco.com/jira/browse/ALF-19057

And I did it because yesterday, looking for a solution to the problems found when the files...

$TOMCAT_HOME/webapps/alfresco/WEB-INF/lib/media-viewers-2.5.1.jar/alfresco/extension/org_sharextras_pdfviewer-context.xml $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib/media-viewers-2.5.1.jar/alfresco/extension/org_sharextras_video-thumbnail-context.xml $TOMCAT_HOME/webapps/alfresco/WEB-INF/lib/media-viewers-2.5.1.jar/alfresco/extension/org_sharextras_video-transform-context.xml

Were loaded, I tried to do the same with the default config files.

What I don't understand is how you could start Alfresco because if I enable:

$TOMCAT_HOME/shared/classes/alfresco/extension/video-thumbnail-context.xml $TOMCAT_HOME/shared/classes/alfresco/extension/video-transformation-context.xml

Alfresco can't simply be started.

Did you use the last nightly build (14th of may) to do those tests?

http://dev.alfresco.com/downloads/nightly/dist/

Anyway, I think I will wait for a solution before I try a new release.

Thanks.

wabson commented 11 years ago

I added a comment to ALF-19057 which should explain how I got video-thumbnail-context.xml and video-transformation-context.xml to work. The equivalent changes to the org_sharextras_*-context.xml files in this project were made in the fix for issue 4.

wabson commented 11 years ago

Added file config/alfresco/extension/subsystems/Transformers/default/default/org_sharextras_media-viewers.properties. This adds the required default repository properties to enable the defined transformers but restrict their scope to certain mimetypes only. This fixes this issue.