⚠️ Before posting ⚠️
Steps to reproduce
- Configure a Nextcloud account in the Nextcloud Android app;
- Have JPEG, PDF and MP4 files stored in Nextcloud;
- From another Android application, open the Android system file picker using the Storage Access Framework;
- Select Nextcloud as the document provider;
- Navigate to a folder containing these file types;
- Observe that JPEG files can display thumbnails, while PDF and MP4 files are shown only with generic file-type icons;
- Open the same files directly in the Nextcloud Android app and observe that previews are available there.
Expected behaviour
PDF and video files should expose thumbnail support through the Nextcloud Android DocumentsProvider when a preview is available or can be generated, allowing Android's system file picker to display thumbnails in the same way it does for image files.
Actual behaviour
When Nextcloud is accessed through Android's system file picker, JPEG files can display thumbnails, but PDF and MP4 files are shown only with generic file-type icons.
The same PDF and MP4 files display previews correctly when viewed directly inside the Nextcloud Android app.
I also reproduced the behavior while monitoring the Nextcloud DocumentsProvider with ADB. openDocumentThumbnail() is called for JPEG files, but no corresponding thumbnail requests are observed for PDF or MP4 files.
This suggests that thumbnail support is not being exposed to Android SAF for these file types.
Android version
16
Device brand and model
Samsung Galaxy S24 FE
Stock or custom OS?
Stock
Nextcloud android app version
34.1.0
Nextcloud server version
33.0.5
Using a reverse proxy?
I don't know
Android logs
ADB investigation:
For JPEG files, Android requests thumbnails from the Nextcloud DocumentsProvider:
DocumentsStorageProvider: openDocumentThumbnail(), id=
The provider then attempts to access a cached JPEG thumbnail:
DiskLruImageCacheFileProvider: Error opening file:
/data/user/0/com.nextcloud.client/cache/.jpg
When folders containing PDF and MP4 files are displayed, no corresponding
openDocumentThumbnail() calls are observed for those files.
All account names, server addresses, filenames and document IDs have been
redacted.
Server error logs
Additional information
The same PDF and MP4 files have working previews inside the Nextcloud Android app. The issue appears only when Nextcloud is accessed as a document provider through Android's Storage Access Framework.
ADB testing showed that openDocumentThumbnail() is requested for JPEG files, while no equivalent request is made for PDF or MP4 files.
This may indicate that thumbnail capability is not being advertised to Android for PDF and video document types.
Possibly related, but not identical:
#1827 — Thumbnails don't show when NC used as a document provider
#14863 — Incorrect Default Thumbnail for PDF Files
No full logs are attached because they contain account names, server addresses, filenames and document identifiers. Relevant log excerpts were manually redacted above.
Steps to reproduce
Expected behaviour
PDF and video files should expose thumbnail support through the Nextcloud Android DocumentsProvider when a preview is available or can be generated, allowing Android's system file picker to display thumbnails in the same way it does for image files.
Actual behaviour
When Nextcloud is accessed through Android's system file picker, JPEG files can display thumbnails, but PDF and MP4 files are shown only with generic file-type icons.
The same PDF and MP4 files display previews correctly when viewed directly inside the Nextcloud Android app.
I also reproduced the behavior while monitoring the Nextcloud DocumentsProvider with ADB. openDocumentThumbnail() is called for JPEG files, but no corresponding thumbnail requests are observed for PDF or MP4 files.
This suggests that thumbnail support is not being exposed to Android SAF for these file types.
Android version
16
Device brand and model
Samsung Galaxy S24 FE
Stock or custom OS?
Stock
Nextcloud android app version
34.1.0
Nextcloud server version
33.0.5
Using a reverse proxy?
I don't know
Android logs
ADB investigation:
For JPEG files, Android requests thumbnails from the Nextcloud DocumentsProvider:
DocumentsStorageProvider: openDocumentThumbnail(), id=
The provider then attempts to access a cached JPEG thumbnail:
DiskLruImageCacheFileProvider: Error opening file:
/data/user/0/com.nextcloud.client/cache/.jpg
When folders containing PDF and MP4 files are displayed, no corresponding
openDocumentThumbnail() calls are observed for those files.
All account names, server addresses, filenames and document IDs have been
redacted.
Server error logs
Additional information
The same PDF and MP4 files have working previews inside the Nextcloud Android app. The issue appears only when Nextcloud is accessed as a document provider through Android's Storage Access Framework.
ADB testing showed that openDocumentThumbnail() is requested for JPEG files, while no equivalent request is made for PDF or MP4 files.
This may indicate that thumbnail capability is not being advertised to Android for PDF and video document types.
Possibly related, but not identical:
#1827 — Thumbnails don't show when NC used as a document provider
#14863 — Incorrect Default Thumbnail for PDF Files
No full logs are attached because they contain account names, server addresses, filenames and document identifiers. Relevant log excerpts were manually redacted above.