feat:(PB-6297) show image thumbnails in public shared folder preview - #2053
Open
victor-ferro wants to merge 6 commits into
Open
feat:(PB-6297) show image thumbnails in public shared folder preview#2053victor-ferro wants to merge 6 commits into
victor-ferro wants to merge 6 commits into
Conversation
7 tasks
Deploying drive-web with
|
| Latest commit: |
f2afcd8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://898ed71c.drive-web.pages.dev |
| Branch Preview URL: | https://pb-6297-thumbnails.drive-web.pages.dev |
CandelR
reviewed
Jul 24, 2026
|
|
||
| useEffect(() => { | ||
| const thumbnail = (item.thumbnails as Thumbnail[] | undefined)?.[0]; | ||
| const isImage = !item.isFolder && !!item.type && thumbnailableImageExtension.includes(item.type.toLowerCase()); |
Collaborator
There was a problem hiding this comment.
not only the images has thumbnails, also the videos and some docs as pdfs
Comment on lines
+48
to
+51
| downloadPublicThumbnail( | ||
| thumbnail, | ||
| { user: item.credentials.networkUser, pass: item.credentials.networkPass }, | ||
| publicShareKey, |
Collaborator
There was a problem hiding this comment.
nit: For quick navigation and folders containing lots of images, an abort controller might come in handy (this would also apply to Drive, which doesn’t have one, and it would be good to be able to cancel requests. I’m not saying we should do the Drive part here! haha)
CandelR
approved these changes
Jul 28, 2026
# Conflicts: # src/views/PublicShared/components/PublicSharedFolderContent.tsx
|
xabg2
approved these changes
Jul 28, 2026
xabg2
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Only checked the payments-related changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Second part of PB-6297, stacked on #2052. The public shared folder listing now shows real image thumbnails instead of the generic file-type icon.
Thumbnails are encrypted files in the network like any other, so downloading one needs the same three inputs as a regular file: its network coordinates, the share network credentials, and the decryption key. This PR wires those for the public (unauthenticated) context:
derivePublicSharingKey(new, extracted inshare.service.ts): theaes.decrypt(encryptionKey, code)+ sharing-version handling that lived inline indownloadPublicSharedFolderis now a reusable function returning aFileKey({ bucketKey }forinxt-v3sharings,{ mnemonic }for older ones).downloadPublicSharedFoldernow consumes it — pure refactor, no behavior change.downloadPublicThumbnail(new inthumbnail.service.ts): downloads and decrypts a thumbnail (bucket_id/bucket_file) with explicit credentials and key, returning a Blob — the existingdownloadThumbnailrelies on the authenticated user context, which does not exist on a public link.PublicSharedItemList: for image items with a thumbnail, downloads it and renders it viaURL.createObjectURL(revoked on unmount); falls back to the type icon otherwise. Credentials travel per-item (set by the hook from the files response), and the share key is derived once inPublicSharedFolderContent(useMemo) and passed down.ShareFolderView: passesencryptionKey/sharingVersionfrom the sharing meta down to the preview.Related Issues
Relates to PB-6297.
Related Pull Requests
PB-6297-folder-link-preview) — merge that one first.PB-6297-preview-download(per-item download and file preview), to be opened next.Checklist
Testing Process
yarn vitest run src/app/drive/services/thumbnail.service.test.ts— new case: "When downloading a public thumbnail, then it downloads the thumbnail file with the share credentials and key".yarn typecheckandyarn lintclean; full unit suite run by the pre-commit hook.