nextcloud / nextcloud/calendar

Event attachments: Unable to create sharing link when using the file picker

Open
#6,557 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug Feature: Editor Feature: Sharing
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Steps to reproduce
  1. Create an event (don't save!)
  2. Click "More details"
  3. Click "Add from Files" (it's important to pick a file from picker, don't upload one)
  4. Add an attendee
  5. Click "Save"
  6. A modal is shown to confirm creating the share link
  7. Click "Invite"
  8. See an error toast "Wrong path, file/folder does not exist"
Expected behavior

It should work 🥳

Actual behaviour

It does not work 😞

There's a POST request for /ocs/v2.php/apps/files_sharing/api/v1/shares with the body {"shareType":3,"path":"/Calendar/welcome.txt"}.

The issue is the static "Calendar" prefix. That only works for newly uploaded files, but not if an existing file (outside the calendar directory) was picked.

Calendar app version

stable5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the event attachment file-picker flow that creates the POST request to /ocs/v2.php/apps/files_sharing/api/v1/shares. Compare the selected file's path with the request body, especially the static /Calendar prefix. Done means creating a share link succeeds for an existing file selected outside the calendar directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.