Skip to content

feat(graph): populate driveItem.webUrl per Libre Graph spec#2744

Merged
dschmidt merged 1 commit into
mainfrom
feat/driveitem-weburl
May 12, 2026
Merged

feat(graph): populate driveItem.webUrl per Libre Graph spec#2744
dschmidt merged 1 commit into
mainfrom
feat/driveitem-weburl

Conversation

@dschmidt
Copy link
Copy Markdown
Contributor

@dschmidt dschmidt commented May 12, 2026

The Libre Graph spec declares webUrl on driveItem but cs3ResourceToDriveItem never set it, only drive.webUrl was populated.

Populate it by parsing the configured public base URL once at service construction and threading it through the shared driveItem builder. Every endpoint that returns drive items now carries the field.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 12, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · -181 duplication

Metric Results
Complexity 0
Duplication -181

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

The Libre Graph spec declares webUrl on driveItem but
cs3ResourceToDriveItem never set it. Build the /f/<resource-id>
permalink off the configured public base URL (same source drives.go
reads for drive.webUrl) and parse it once at service construction
so callers can use it as a plain field.
@dschmidt dschmidt force-pushed the feat/driveitem-weburl branch from 3696007 to a75d89d Compare May 12, 2026 13:28
dschmidt added a commit to opencloud-eu/n8n-nodes-opencloud that referenced this pull request May 12, 2026
Drop the invented {success, resource, operation, spaceId, path, name}
envelope from folder:create, file:upload, file/folder:copy/move, and
file:download. Resolve the resulting item via Graph after each WebDAV
write and return the driveItem directly, so write outputs match the
read outputs (folder:list, share, user) that already return raw Graph
types. file/folder:delete returns {}.

webUrl on the returned driveItem stays empty until
opencloud-eu/opencloud#2744 lands server-side; once it does, the field
arrives populated without any node-side change.

Closes #7.
dschmidt added a commit to opencloud-eu/n8n-nodes-opencloud that referenced this pull request May 12, 2026
Drop the invented {success, resource, operation, spaceId, path, name}
envelope from folder:create, file:upload, file/folder:copy/move, and
file:download. Resolve the resulting item via Graph after each WebDAV
write and return the driveItem directly, so write outputs match the
read outputs (folder:list, share, user) that already return raw Graph
types. file/folder:delete returns {}.

webUrl on the returned driveItem stays empty until
opencloud-eu/opencloud#2744 lands server-side; once it does, the field
arrives populated without any node-side change.

Closes #7.
dschmidt added a commit to opencloud-eu/n8n-nodes-opencloud that referenced this pull request May 12, 2026
Drop the invented {success, resource, operation, spaceId, path, name}
envelope from folder:create, file:upload, file/folder:copy/move, and
file:download. Resolve the resulting item via Graph after each WebDAV
write and return the driveItem directly, so write outputs match the
read outputs (folder:list, share, user) that already return raw Graph
types. file/folder:delete returns {}.

webUrl on the returned driveItem stays empty until
opencloud-eu/opencloud#2744 lands server-side; once it does, the field
arrives populated without any node-side change.

Closes #7.
dschmidt added a commit to opencloud-eu/n8n-nodes-opencloud that referenced this pull request May 12, 2026
Drop the invented {success, resource, operation, spaceId, path, name}
envelope from folder:create, file:upload, file/folder:copy/move, and
file:download. Resolve the resulting item via Graph after each WebDAV
write and return the driveItem directly, so write outputs match the
read outputs (folder:list, share, user) that already return raw Graph
types. file/folder:delete returns {}.

webUrl on the returned driveItem stays empty until
opencloud-eu/opencloud#2744 lands server-side; once it does, the field
arrives populated without any node-side change.

Closes #7.
Copy link
Copy Markdown
Member

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

IMHO this is a no brainer.

@dschmidt dschmidt merged commit 5b538e1 into main May 12, 2026
61 checks passed
@dschmidt dschmidt deleted the feat/driveitem-weburl branch May 12, 2026 18:50
@openclouders openclouders mentioned this pull request May 12, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants