App stops working if enable_previews is set to false
From @sualko on January 5, 2016 12:44
Also the image full size preview in the file viewer does not work as normally.
Steps to reproduce
- Set 'enable_previews' to false in config.php
- Go to gallery app or switch to gallery app in file viewer
Expected behaviour
Show pictures
Actual behaviour
Nothing is shown. /index.php/apps/gallery/files/list?location=&mediatypes=&features=&etag returns {"files":[],"albuminfo":{"path":"","fileid":2,"permissions":31,"etag":"568a7f3370702"},"locationhaschanged":false}.
Server configuration
Operating system: Ubuntu 12.04
Web server: Apache 2.4
Database: MariaDB 5.5.47
PHP version: 5.5
ownCloud version: 8.2.1.4
Updated from an older ownCloud or fresh install: Updated
List of activated apps:
- activity: 2.1.3
- calendar: 0.8.1
- contacts: 0.5.0.0
- direct_menu: 0.5
- documents: 0.11.0
- files: 1.2.0
- files_external: 0.3.0
- files_pdfviewer: 0.7
- files_sharing: 0.7.0
- files_texteditor: 2.0
- files_trashbin: 0.7.0
- gallery: 14.2.0
- ojsxc: 2.1.5
- piwik: 0.1.0
- templateeditor: 0.1
- updater: 0.6
The content of config/config.php:
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "\/var\/www\/wolke.herberth.eu\/data",
"dbtype": "mysql",
"version": "8.2.1.4",
"dbname": "REMOVED",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "50acf6ecd6f31",
"loglevel": 3,
"maintenance": false,
"blacklisted_files": [
".htaccess",
"php.ini"
],
"forcessl": true,
"session_lifetime": 3600,
"theme": "",
"trusted_domains": [
],
"mail_from_address": "wolke",
"mail_smtpmode": "php",
"mail_domain": "REMOVED",
"secret": "***REMOVED SENSITIVE VALUE***",
"debug": true,
"trashbin_retention_obligation": "auto",
"filelocking.enabled": "true",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": 0,
"timeout": 0
},
"enable_previews": false
},
"apps": {
"activity": {
"enabled": "yes",
"installed_version": "2.1.3",
"types": "filesystem"
},
"admin_dependencies_chk": {
"enabled": "no",
"installed_version": "0.02",
"ocsid": "166041",
"types": ""
},
"admin_migrate": {
"enabled": "no",
"installed_version": "0.1"
},
"appframework": {
"enabled": "no",
"installed_version": "1.0",
"types": ""
},
"backgroundjob": {
"lastjob": "3"
},
"bookmarks": {
"enabled": "no",
"installed_version": "0.4",
"ocsid": "168710",
"types": ""
},
"calendar": {
"enabled": "yes",
"installed_version": "0.8.1",
"ocsid": "168707",
"types": ""
},
"contacts": {
"enabled": "yes",
"installed_version": "0.5.0.0",
"ocsid": "168708",
"types": ""
},
"core": {
"backgroundjobs_mode": "cron",
"backgroundjobs_step": "regular_tasks",
"backgroundjobs_task": "OC_Cache_FileGlobal-gc",
"global_cache_gc_lastrun": "1437729302",
"installedat": "1353512663.3967",
"lastcron": "1451996103",
"lastupdateResult": "{\"version\":{},\"versionstring\":{},\"url\":{},\"web\":{}}",
"lastupdatedat": "1451995248",
"public_caldav": "calendar\/share.php",
"public_calendar": "calendar\/share.php",
"public_documents": "documents\/public.php",
"public_files": "files_sharing\/public.php",
"public_gallery": "gallery\/public.php",
"public_shorty_qrcode": "shorty\/qrcode.php",
"public_shorty_query": "shorty\/query.php",
"public_shorty_relay": "shorty\/relay.php",
"public_webdav": "files_sharing\/publicwebdav.php",
"remote_ampache": "media\/remote.php",
"remote_caldav": "calendar\/appinfo\/remote.php",
"remote_calendar": "calendar\/appinfo\/remote.php",
"remote_carddav": "contacts\/appinfo\/remote.php",
"remote_contacts": "contacts\/appinfo\/remote.php",
"remote_contactthumbnail": "contacts\/thumbnail.php",
"remote_core.css": "\/core\/minimizer.php",
"remote_core.js": "\/core\/minimizer.php",
"remote_files": "files\/appinfo\/remote.php",
"remote_filesync": "files\/appinfo\/filesync.php",
"remote_webdav": "files\/appinfo\/remote.php",
"repairlegacystoragesdone": "yes",
"shareapi_allow_mail_notification": "yes",
"shareapi_allow_public_notification": "yes",
"shareapi_default_expire_date": "yes",
"shareapi_expire_after_n_days": "21"
},
"direct_menu": {
"enabled": "yes",
"installed_version": "0.5",
"ocsid": "169148",
"types": ""
},
"documents": {
"enabled": "yes",
"installed_version": "0.11.0",
"ocsid": "168711",
"types": "",
"unstable": "false"
},
"files": {
"backgroundwatcher_previous_file": "580",
"backgroundwatcher_previous_folder": "16470",
"default_quota": "none",
"enabled": "yes",
"installed_version": "1.2.0",
"mountconfigmtime": "1355946610",
"types": "filesystem"
},
"files_external": {
"enabled": "yes",
"installed_version": "0.3.0",
"ocsid": "166048",
"types": "filesystem"
},
"files_imageviewer": {
"enabled": "no",
"installed_version": "1.0"
},
"files_imageviewer2": {
"enabled": "no",
"installed_version": "1.0",
"types": ""
},
"files_mv": {
"enabled": "no",
"installed_version": "0.6.0",
"ocsid": "150271",
"types": "filesystem"
},
"files_odfviewer": {
"enabled": "no",
"installed_version": "0.1"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "0.7",
"ocsid": "166049",
"types": ""
},
"files_quicksearch": {
"enabled": "no",
"installed_version": "0.1.1",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"installed_version": "0.7.0",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.0",
"ocsid": "166051",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "0.7.0",
"types": "filesystem"
},
"files_tree": {
"enabled": "no",
"installed_version": "0.6.0",
"types": ""
},
"files_versions": {
"enabled": "no",
"installed_version": "1.0.2",
"types": "filesystem"
},
"firstrunwizard": {
"enabled": "no",
"installed_version": "1.0",
"types": ""
},
"gallery": {
"enabled": "yes",
"installed_version": "14.2.0",
"types": ""
},
"galleryplus": {
"enabled": "no",
"installed_version": "14.3.0",
"ocsid": "169116",
"types": ""
},
"mail": {
"enabled": "no",
"installed_version": "0.1.3",
"ocsid": "169914",
"types": ""
},
"media": {
"enabled": "no",
"installed_version": "0.4.3"
},
"news": {
"enabled": "no",
"installed_version": "8.2",
"types": ""
},
"ojsxc": {
"enabled": "yes",
"installed_version": "2.1.5",
"ocsid": "162257",
"types": "",
},
"piwik": {
"enabled": "yes",
"installed_version": "0.1.0",
"internal": "yes",
"piwik": "REMOVED",
"types": ""
},
"shorty": {
"enabled": "no",
"installed_version": "0.3.27",
"ocsid": "150401",
"types": "internet,bookmark"
},
"tasks": {
"enabled": "no",
"installed_version": "0.1",
"types": ""
},
"templateeditor": {
"enabled": "yes",
"installed_version": "0.1",
"types": ""
},
"updater": {
"1a9dcc9ec5b895fa47a3c328e07105f8": "",
"9ce4c2c49357a02b73ae0a2db2ed55ad": "1",
"enabled": "yes",
"installed_version": "0.6",
"types": ""
},
"user_external": {
"enabled": "no",
"installed_version": "0.1",
"types": "authentication,prelogin"
},
"user_migrate": {
"enabled": "no",
"installed_version": "0.1"
}
}
}
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: no
Client configuration
Browser: Opera 33.0
Operating system: Ubuntu 14.04
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Copied from original issue: owncloud/gallery#488
Expected behaviour
Show pictures
Nope, can't happen. If you disable preview, then all apps which need previews will get the media type icons. It doesn't make sense to do that in a gallery app, so I need to stop the app and show an error message instead.
From @sualko on January 6, 2016 12:34
I think not only this app should show an error, but also the documentation should be updated, because it says that this flag is only for the small file previews.
Do you have any advise, how I could easily disable file previews, but still use the gallery app?
I agree that the doc should be improved and I've opened a ticket there: https://github.com/owncloud/documentation/issues/1982
Do you have any advise, how I could easily disable file previews, but still use the gallery app?
Unfortunately, no. Gallery will not have its own engine, for as long as one is provided in core.
From @XANi on January 19, 2016 16:27
Simple fix would be to just have working preview that just sends full image for "slideshow view" if previews are disabled.
We recently upgraded from OC8.1 where we had previews off because performance was horrible (no caching of any sort for thumbnails), sure icons didnt work but preview was functional and in LAN downloading whole file was actually much faster than waiting for OC to resize pic.
Our designers often work with directories of 100+ images so previews were too much performance hit, but having at least working slideshow would be nice. At the moment we're using old version of gallery plugin just because of that
From @sualko on January 20, 2016 9:3
@XANi exactly. Full size file view would be awesome. Additionally I will open an issue in core to add a new option "disable_fileicon" or something similar.
The documentation has been updated.
I think it should not be too difficult for someone to create a PR which redirects to the download controller when previews are not enabled.
From @sualko on February 10, 2016 12:36
Just as a starting point. Slideshow works in file app if you replace galleryfileaction.js#L114 with
imageUrl = OC.generateUrl("apps/files/ajax/download.php?dir=" + dir + "&files=" + file.name);
Would really be great to have that enhancement implemented. Currently the app uses a lot of cpu for resizing pictures in slide show, even with setting 'preview_max_scale_factor'=1. The above suggested modification avoids resizing and makes the slide show a lot faster. And I would really like to have previews disabled, but slideshow still working.