Folder-upload desktop refresh + inline upload previews - #400
Merged
Conversation
Tree uploads create folder rows and placements server-side (mkdir-p from relativePath / emptyDirs), but each per-file response only carries that file's own placement — the new folder tile stayed invisible until the next heartbeat tick. After a tree batch the dialog now re-pulls the canonical folder list and the target container's placements into the shared store (the same pattern the share-accept flow uses). Flat uploads keep the direct returned-placement ingest and skip the extra round-trips.
Selecting a stored upload now previews it on the right: images, video, and audio render inline via the authenticated download URL (subresource loads ignore the attachment disposition, so no direct file URL is ever exposed). Undecodable formats (HEIC on Chromium) degrade to a friendly no-preview note, as do non-media kinds, and every upload preview carries a Download action plus a mime + size meta line. Extensibility rides the pre-existing desktop-mode.files.preview filter: a plugin that recognizes a type (PDF via PDF.js, say) returns its own element and fully replaces the built-in. Documented with a PDF example and covered by tests including the filter seam.
epeicher
force-pushed
the
deskmod-45-real-file-storage
branch
from
July 23, 2026 15:04
7833533 to
a5ebe64
Compare
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.
What it does
Two follow-up fixes on the real-file-storage feature that landed in #381:
attachmentdisposition, so no direct file URL is exposed), with amime · sizemeta line and a Download action. Undecodable formats (HEIC on Chromium) degrade to a no-preview note. Other types show the note; plugins preview additional types (PDF via PDF.js, …) through the pre-existingdesktop-mode.files.previewfilter — documented with a worked example indocs/examples/desktop-file-storage.md.Uploading folders refresh automatically now
CleanShot.2026-07-23.at.16.52.45.mp4
New preview functionality for valid Media files
Testing instructions
No PHP changes. Manual pass: drag a nested folder onto the desk and confirm the folder tile appears the moment the batch finishes (no F5, no heartbeat wait); select an image/video/audio upload in a folder window and confirm it renders in the preview pane with a working Download button; select a PDF and confirm the no-preview note.