fix(nextcloud): use correct URL format for opening files#28869
Conversation
The old format (/apps/files/?openfile=<id>) returns 403. Nextcloud expects /index.php/apps/files/files/<id>?openfile=true
|
Thank you for your contribution! 🎉 🔔 @uetchy @xmok @jamespurnama1 you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="fix/nextcloud-open-file-url"
FORK_URL="https://github.com/HrushiYadav/extensions.git"
EXTENSION_NAME="nextcloud"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryThis PR fixes 403 errors when opening files from Nextcloud search results by updating the URL format to match newer Nextcloud versions, and also upgrades
Confidence Score: 5/5The URL format change is targeted and correct — it directly addresses the 403 regression in newer Nextcloud versions without touching any other logic. The core fix is straightforward: two lines in Search.tsx update a known-broken URL pattern to the documented Nextcloud format, and both files improve query-parameter encoding. The only issue is a minor changelog date format nit. No files require special attention. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/nextcloud/CHANGELOG.md:3
The changelog entry uses a hardcoded date instead of the `{PR_MERGE_DATE}` template placeholder. Per the Raycast changelog convention, the merge date is automatically populated at release time — a hardcoded date will be wrong if the PR merges on a different day.
```suggestion
## [Fix Open File URL format] - {PR_MERGE_DATE}
```
Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
encodeURI leaves &, #, ? unescaped which breaks paths like /Projects/R&D or /Team raycast#1
0xdhrv
left a comment
There was a problem hiding this comment.
Looks good to me, approved ✅
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Opening a file from search results gives a 403 because the URL format changed in newer Nextcloud versions.
Old:
/apps/files/?dir=<path>&openfile=<id>New:
/index.php/apps/files/files/<id>?dir=<path>&editing=false&openfile=trueChecklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folderFixes #28837