-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview is active on file sidebar even if preview is set false on config.php #6764
Comments
@rogerfv1 Thanks for the detailed information! This happens in current master too, and it could be solved by providing the For consistency it should be taken into account too in the public shared file page. However... should |
or vice versa, loadPreviews should take enable_previews into account? after all it has an else branch, so it can continue there in case. |
…fig.php nextcloud#6764 - Provide the enable_previews value in oc_config in JSConfigHelper.php. - Take oc_config.enable_previews into account in the condition of SidebarPreviewManager.loadPreview. - For consistency it take into account too in the public shared file page.
@rullzer, according @rogerfv1, there are two reasons to disable image previews:
|
Fixed with #15719 |
No because we now rely on what dav is telling us (if a file have a preview or not) server/apps/dav/lib/Connector/Sabre/FilesPlugin.php Lines 355 to 357 in b81fb18
server/lib/private/PreviewManager.php Lines 218 to 221 in 98f9198
|
But the |
You can forgtot about the SidebarPreviewManager :) |
Steps to reproduce
Expected behaviour
The preview should not be shown on details sidebar.
Actual behaviour
The preview is showed on details sidebar.
Server configuration
Operating system: Debian 8
Web server: Apache 2.4
Database: Postgresql 9.4
PHP version: php 5.6
Nextcloud version: 12.0.3
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
We looked at the source code to see if we found the function that defines the preview load.
So we find a javascript function named loadPreview but it seems that this function is not considering the enable_previews set on config.php.
File: /var/www/nextcloud/apps/files/js/sidebarpreviewmanager.js
"...
loadPreview: function (model, $thumbnailDiv, $thumbnailContainer) {
if (model.get('hasPreview') === false && this.getMimeTypePreviewHandler(model.get('mimetype')) === null) {
...
"
In this case when getMimeTypePreviewHandler = 'native code' the preview is showed even you set enable_previews to false on config.php.
These are the results we got in our tests.
The text was updated successfully, but these errors were encountered: