Closed quenenni closed 2 years ago
If I understand it right, this is because any images are considered a "thumbnail", even your "clicked on" image. https://github.com/nextcloud/server/blob/master/lib/private/Preview/Image.php
So this not seems a bug, but not so good documented feature.
Thanks for the explanation.
eventually this could be related to the bug I just posted: https://github.com/nextcloud/server/issues/31284
How to use GitHub
Steps to reproduce
If I upload an image bigger than 50 Mo, the thumbnail is indeed not generated and a generic icon is displayed.
But when I click on that image, I have an error saying "Error loading test.jpg".
The image is good. I checked the file info and size between my computer and the server, and both are identical.
If I set the option preview_max_filesize_image to a bigger size than the image, the thumbnail is created and the image is correctly displayed when I click on it.
Expected behavior
I expected to have a generic icon for images bigger than preview_max_filesize_image value, but clicking on the image should open and display the image, not showing an error msg.
Did I misanderstood the purpose of this option and it's a max-file-size image you accept to display? For me, it's only about the preview icon, not the image itself.
If indeed I misanderstood the option, at least, the error message should be clearer, like "This image is too big to be displayed".
Screenshots
Server configuration
Signing status
``` Technical information ===================== The following list covers which files have failed the integrity check. Please read the previous linked documentation to learn more about the errors and how to fix them. Results ======= - activity - EXTRA_FILE - l10n/ta.js - l10n/ug.json - l10n/ta.json - l10n/ug.js Raw output ========== Array ( [activity] => Array ( [EXTRA_FILE] => Array ( [l10n/ta.js] => Array ( [expected] => [current] => a868738d9ee40b83f7ce64de8811231c15e257633ce3fecc871f95f113ad6afd6a765a503b01eaa9cb19ce801adfa080464404f2bc2de532d7194de87fb19677 ) [l10n/ug.json] => Array ( [expected] => [current] => f8c23504c2f924518ff872a48c4d54e427805feb9fe1c6b91889252ce55829db55ef31c2c3d579094eb8ae78bbb8ba0dddf9983ab2ca9216c2c75fd9d48225b2 ) [l10n/ta.json] => Array ( [expected] => [current] => c061ca61d1012a7c8ae1cff66b7161171e09fa3a932602d5eaf94643f2d63862b696d60f4ce0bc198c6180a44e05701f5a068a38e4a8492e8d6080894181e103 ) [l10n/ug.js] => Array ( [expected] => [current] => b9028c713a8b2d8895bb0771236aa991cc6d9c1da4018abad098b86df0cff0a454550f15611de038f497782dda0ac67c338a6bee8e34ce2e5b82cfb918cf36b0 ) ) ) ) ```App list
``` Enabled: - accessibility: 1.8.0 - activity: 2.15.0 - apporder: 0.13.0 - bookmarks: 10.0.2 - bruteforcesettings: 2.2.0 - calendar: 3.0.1 - cloud_federation_api: 1.5.0 - comments: 1.12.0 - contacts: 4.0.6 - cospend: 1.4.3 - dav: 1.19.0 - federatedfilesharing: 1.12.0 - files: 1.17.0 - files_markdown: 2.3.5 - files_pdfviewer: 2.3.1 - files_sharing: 1.14.0 - files_trashbin: 1.12.0 - files_versions: 1.15.0 - files_videoplayer: 1.11.0 - lookup_server_connector: 1.10.0 - notes: 4.2.0 - oauth2: 1.10.0 - oidc_login: 2.1.0 - photos: 1.4.0 - polls: 3.3.0 - provisioning_api: 1.12.0 - richdocuments: 4.2.3 - settings: 1.4.0 - sharebymail: 1.12.0 - tasks: 0.14.2 - text: 3.3.0 - twofactor_backupcodes: 1.11.0 - user_external: 2.1.0 - user_status: 1.2.0 - viewer: 1.6.0 - workflowengine: 2.4.0 ```Config report
``` { "system": { "trusted_domains": [ "cloud.mydomain.tld" ], "activity_expire_days": 180, "appstoreenabled": true, "appstore.experimental.enabled": false, "auth.bruteforce.protection.enabled": true, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "6033", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "default_language": "fr", "default_phone_region": "be", "htaccess.RewriteBase": "\/", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "logfile": "\/var\/log\/nextcloud.log", "logdateformat": "F d, Y H:i:s", "loglevel": 2, "log_type": "file", "logtimezone": "Europe\/Brussels", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_smtpport": 25, "maintenance": false, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\Redis", "minimum.supported.desktop.version": "2.1.0", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "preview_max_filesize_image": 15, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "secret": "***REMOVED SENSITIVE VALUE***", "simpleSignUpLink.shown": false, "trashbin_retention_obligation": "60, 90", "updatechecker": false, "upgrade.disable-web": "true", "version": "22.2.3.0", "versions_retention_obligation": "60, 90", "overwrite.cli.url": "https:\/\/cloud.mydomain.tld", "theme": "nubo", "overwritehost": "cloud.mydomain.tld", "overwriteprotocol": "https", "allow_user_to_change_display_name": false, "lost_password_link": "disabled", "oidc_login_provider_url": "https:\/\/auth.mydomain.tld", "oidc_login_client_id": "nextcloud", "oidc_login_client_secret": "***REMOVED SENSITIVE VALUE***", "oidc_login_auto_redirect": true, "oidc_login_logout_url": "https:\/\/auth.mydomain.tld\/", "oidc_login_hide_password_form": true, "oidc_login_attributes": { "id": "sub", "name": "name", "mail": "email", "quota": "nextCloudQuota", "groups": "groupsNc", "is_admin": "admin_bool" }, "oidc_login_end_session_redirect": true, "oidc_login_default_group": "", "oidc_login_use_external_storage": true, "oidc_login_scope": "email profile openid", "oidc_login_proxy_ldap": false, "oidc_login_disable_registration": false, "oidc_login_redir_fallback": false, "oidc_login_tls_verify": true, "oidc_login_default_quota": "10737418240", "oidc_create_groups": true, "oidc_login_webdav_enabled": true, "oidc_login_public_key_caching_time": 86400, "oidc_login_min_time_between_jwks_requests": 10, "oidc_login_well_known_caching_time": 86400 } } ```Client configuration
Logs
Browser log
a) The javascript console log ``` GET https://cloud.mydomain.tld/core/preview?fileId=175119&x=1680&y=1050&a=true [HTTP/2 404 Not Found 95ms] Error loading /test.jpg error { target: img.viewer__file.viewer__file--active, isTrusted: true, srcElement: img.viewer__file.viewer__file--active, currentTarget: img.viewer__file.viewer__file--active, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … } ``` b) The network log (HAR export) ``` { "log": { "version": "1.2", "creator": { "name": "Firefox", "version": "81.0" }, "browser": { "name": "Firefox", "version": "81.0" }, "pages": [ { "startedDateTime": "2021-12-11T16:11:42.491+01:00", "id": "page_4", "title": "Files - NextCloud", "pageTimings": { "onContentLoad": -1, "onLoad": -1 } } ], "entries": [ { "pageref": "page_4", "startedDateTime": "2021-12-11T16:11:42.491+01:00", "request": { "bodySize": 661, "method": "PROPFIND", "url": "https://cloud.mydomain.tld/remote.php/dav/files/userX/test.jpg", "httpVersion": "HTTP/2", "headers": [ { "name": "Host", "value": "cloud.mydomain.tld" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0" }, { "name": "Accept", "value": "text/plain" }, { "name": "Accept-Language", "value": "fr-BE,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "requesttoken", "value": "reQ5AyS7LULTrBEAPcy08sIdhoXIsdw3ykJa8hIM=:3LNhQmD3SCeDwydveqLgtRSxhN0sZRGKn47mN1sU=" }, { "name": "X-Requested-With", "value": "XMLHttpRequest" }, { "name": "Depth", "value": "0" }, { "name": "Content-Type", "value": "text/plain;charset=UTF-8" }, { "name": "Content-Length", "value": "661" }, { "name": "Origin", "value": "https://cloud.mydomain.tld" }, { "name": "DNT", "value": "1" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "oc_sessionPassphrase=xxxxx; PHPSESSID=yyyyy; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; lemonldap=zzzzz" }, { "name": "TE", "value": "Trailers" } ], "cookies": [ { "name": "oc_sessionPassphrase", "value": "xxxxx" }, { "name": "PHPSESSID", "value": "yyyyy" }, { "name": "__Host-nc_sameSiteCookielax", "value": "true" }, { "name": "__Host-nc_sameSiteCookiestrict", "value": "true" }, { "name": "lemonldap", "value": "zzzzz" } ], "queryString": [], "headersSize": 910, "postData": { "mimeType": "text/plain;charset=UTF-8", "params": [], "text": "\n\t\t\tWeb server error log
``` 11.22.33.44 - - [11/Dec/2021:16:02:16 +0100] "PROPFIND /remote.php/dav/files/userX/test.jpg HTTP/2.0" 207 560 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0" "-" "cloud.mydomain.tld" 11.22.33.44 - - [11/Dec/2021:16:02:16 +0100] "PROPFIND /remote.php/dav/files/userX/ HTTP/2.0" 207 1333 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0" "-" "cloud.mydomain.tld" 11.22.33.44 - - [11/Dec/2021:16:02:16 +0100] "GET /core/preview?fileId=175119&x=1680&y=1050&a=true HTTP/2.0" 404 2 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0" "-" "cloud.mydomain.tld" 11.22.33.44 - - [11/Dec/2021:16:02:16 +0100] "GET /core/preview?fileId=805&x=1680&y=1050&a=true HTTP/2.0" 200 50545 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0" "-" "cloud.mydomain.tld" ```Nextcloud log
Only warnings about deprecated things, no error. ``` {"reqId":"T1sbtavGsDDUItFNVQm8","level":0,"time":"December 11, 2021 16:29:13","remoteAddr":"11.22.33.44","user":"userX","app":"user_external","method":"PROPFIND","url":"/remote.php/dav/files/userX/test.jpg","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"22.2.3.0"} ```