nextcloud / gallery

DEPRECATED Gallery app was replaced by Photos
https://github.com/nextcloud/photos
GNU Affero General Public License v3.0
109 stars 58 forks source link

Gallery always starts at document root #503

Closed linuxrrze closed 5 years ago

linuxrrze commented 5 years ago

Bug report

Gallery always starts at document root - instead of the directory currently displayed in nextcloud

Steps to reproduce

  1. Use browser to log into your nextcloud
  2. select (sub)directory containing images
  3. Switch to gallery view

Expected behaviour

I'd expect the gallery app to display the directory contents of the directory last viewed by nextcloud

Actual behaviour

Gallery always starts at the root directory

Server configuration

Operating system: Ubuntu 18.04

Web server: Apache

Database: postgres

PHP version: 7.2

Nextcloud configuration

Nextcloud version: (see admin page or version.php) 15.0.5

Updated from an older installation or fresh install: Updated

List of activated apps:

App list ``` Enabled: - accessibility: 1.1.0 - activity: 2.8.2 - admin_audit: 1.5.0 - apporder: 0.6.0 - audioplayer: 2.6.0 - bookmarks: 0.16.2 - bookmarks_fulltextsearch: 1.2.0 - bruteforcesettings: 1.3.0 - calendar: 1.6.4 - cloud_federation_api: 0.1.0 - comments: 1.5.0 - contacts: 3.0.3 - dav: 1.8.1 - dicomviewer: 1.1.0 - federatedfilesharing: 1.5.0 - federation: 1.5.0 - files: 1.10.0 - files_fulltextsearch: 1.2.6 - files_fulltextsearch_tesseract: 1.2.0 - files_markdown: 2.0.5 - files_pdfviewer: 1.4.0 - files_sharing: 1.7.0 - files_texteditor: 2.7.0 - files_trashbin: 1.5.0 - files_versions: 1.8.0 - files_videoplayer: 1.4.0 - fulltextsearch: 1.2.5 - fulltextsearch_elasticsearch: 1.2.4 - gallery: 18.2.0 - logreader: 2.0.0 - lookup_server_connector: 1.3.0 - metadata: 0.9.0 - news: 13.0.3 - nextcloud_announcements: 1.4.0 - notifications: 2.3.0 - oauth2: 1.3.0 - onlyoffice: 2.1.2 - password_policy: 1.5.0 - previewgenerator: 2.1.0 - provisioning_api: 1.5.0 - rainloop: 6.0.2 - serverinfo: 1.5.0 - sharebymail: 1.5.0 - spreed: 5.0.2 - support: 1.0.0 - systemtags: 1.5.0 - theming: 1.6.0 - twofactor_backupcodes: 1.4.1 - updatenotification: 1.5.0 - user_ldap: 1.5.0 - workflowengine: 1.5.0 ```

Nextcloud configuration:

Config.php ``` ```{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "15.0.5.3", "installed": true, "ldapIgnoreNamingRules": false, "forcessl": true, "loglevel": "2", "logtimezone": "Europe\/Berlin", "theme": "", "overwrite.cli.url": "https:\/\/cloud.mydomain.de\/", "maintenance": false, "enable_previews": true, "preview_max_scale_factor": 10, "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enabledPreviewProviders": [ "OC\\Preview\\Image", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Illustrator", "OC\\Preview\\Movie", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOffice2007", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\OpenDocument", "OC\\Preview\\PDF", "OC\\Preview\\PhotoShop", "OC\\Preview\\Postscript", "OC\\Preview\\StarOffice", "OC\\Preview\\SVG", "OC\\Preview\\Font" ], "trusted_domains": [ "www.mydomain.de", "cloud.mydomain.de" ], "secret": "***REMOVED SENSITIVE VALUE***", "trashbin_retention_obligation": "auto", "memcache.local": "\\OC\\Memcache\\APCu", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "updater.release.channel": "production", "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "lost_password_link": "https:\/\/www.mydomain.de\/selfservice", "auth.bruteforce.protection.enabled": false, "knowledgebaseenabled": true, "enable_avatars": true, "redis": { "port": "6379", "host": "***REMOVED SENSITIVE VALUE***", "timeout": "0" }, "memcache.locking": "\\OC\\Memcache\\Redis", "filelocking.enabled": true, "data-fingerprint": "***REMOVED***", "mail_smtpmode": "smtp", "mail_smtpauthtype": "PLAIN", "mail_smtpsecure": "tls", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***" } }

Are you using external storage, if yes which one: local folder, smb share, sftp, etc. No

Are you using encryption: yes/no No

Are you using custom gallery.cnf config files: yes/no No

Client configuration

Browser: Chrome

Operating system: Linux

langfingaz commented 5 years ago

Thanks for bringing this up.

Even though I think this is more of a feature request, I fully agree that it would be a great feature to have.

While in the files app the link to the gallery app (by clicking on the gallery icon) somehow would need to dynamically change to https://cloud.example.com/apps/gallery/#<PATH>.

And the other way around, while in the gallery app, the link to the files app would need to change to https://cloud.example.com/apps/files/?dir=<PATH>.

Although some special path names/characters are handled a bit differently by the files/gallery app. For example the forward slash is encoded differently:

apps/files/?dir=/Archiv/EJ Altdorf/2015 vs apps/gallery/#Archiv%2FEJ Altdorf%2F2015

AInteriorB commented 5 years ago

This would be a great feature due to the removal of the switch gallery view <-> list view. For me the grid-view is useless. Is there a way to switch between galery and list currently? This would be one. Thanks for your contribution!

ThomasCr commented 5 years ago

maybe just check referrer to detect the current folder?

langfingaz commented 5 years ago

@AInteriorB Yeah, it would be ideal if the gallery app was "built in" the files app and you could just switch to it as you switch between list and grid view! Though this means quite some effort for the developers I suppose...

@ThomasCr I think a lot of NC instances have the referrer disabled (see Referrer-Policy: no-referrer at the NC 16 installation manual. So switching between the apps with a link that includes the path is probably better.

langfingaz commented 5 years ago

And to be more precise, the two apps are already partially linked. You can switch from the gallery to the files app but not the other way around. Below you can see two screenshots from NC 16.

Switch from Gallery to Files App by clicking top right button img-with-button-to-switch-to-files-app

Missing: Switch from Files to Gallery App. Only grid view possible img-switch-from-files-app-to-gallery-missing

skjnldsv commented 5 years ago

@langfingaz yes it's done on purpose. We implemented the grid view and the new viewer. So gallery is becoming a standalone app

skjnldsv commented 5 years ago

Closing as you cannot switch to the gallery view from files anymore

AInteriorB commented 5 years ago

@skjnldsv, the grid view is definitely not a replacement for a nice gallery view. Images are way too small, are cropped and it just doesn't look like a nice designed overview.