Skip to content

fix: show and download share link files from their WebDAV address - #151

Draft
skjnldsv wants to merge 1 commit into
mainfrom
feat/share-link-originals
Draft

skjnldsv wants to merge 1 commit into
mainfrom
feat/share-link-originals

Conversation

@skjnldsv

Copy link
Copy Markdown
Contributor

Follow-up to #146, for the files Talk hands a guest by their share's link, /s/<token>/download/<name>. In a folder share that link serves the whole folder as a zip, so a file without a preview, or a click on Download, got the zip instead of the file.

The link can't say whether the share is the file itself or a folder holding it. The viewer now asks the share once per page, with a depth 0 PROPFIND on /public.php/dav/files/<token>, and shows and downloads the file from its WebDAV address. A share that doesn't answer (password, error) keeps the link as before.

The download keeps the name of the file that was opened: a file shared alone lives at /public.php/dav/files/<token>, so the address alone would save it under the token. before-download still carries that file too.

Relates to #144

Covered by unit tests, Viewer component tests and a playground e2e. Not tested against a real Talk yet. A Download clicked while the PROPFIND is still running uses the link.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

A file given by its share's link, /s/<token>, cannot be fetched alone
when the share is a folder: the link downloads the whole folder as a
zip. Ask the share once whether it is a file or a folder, and show and
download the file from its WebDAV address instead.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv skjnldsv added this to the 2.0.0 milestone Oct 17, 2026
@skjnldsv skjnldsv added type: bug 🐛 Something isn't working AI assisted 2. developing labels Oct 17, 2026
@skjnldsv skjnldsv self-assigned this Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.01493% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.58%. Comparing base (e448eed) to head (b54f55c).

Files with missing lines Patch % Lines
lib/utils/publicShare.ts 95.74% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
+ Coverage   92.53%   92.58%   +0.05%     
==========================================
  Files          51       51              
  Lines        4177     4237      +60     
  Branches      922      936      +14     
==========================================
+ Hits         3865     3923      +58     
- Misses        289      290       +1     
- Partials       23       24       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@skjnldsv
skjnldsv requested review from Antreesy and removed request for Antreesy October 17, 2026 15:07
@skjnldsv

Copy link
Copy Markdown
Contributor Author

Sorry, still ongoing, not happy with what Claude came up with

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing AI assisted type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant