Can not add photos to album in shared album view, gets copied instead
Describe the bug Trying to add a photo to a shared album via the "Collaborative albums" feature fails with the following message:
Failed to add IMG_20230202_171356_2.jpg to shared album Winterurlaub 2023 (david).
And instead of adding it, it gets duplicated to IMG_20230202_171356_2 (1).jpg in the same file folder. However, it seems to work fine when using the menu item "Albums" instead of "Collaborative albums".
To Reproduce Steps to reproduce the behavior:
- Open the file tab
- Create a folder and share it
- From another account which has permissions to this folder, go to the File tab -> Shares -> the shared folder and upload some photos
- Go to the Photos tab and create a collaborative album
- Open the collaborative album via the menu Item "Collaborative albums" and click "Add"
- Select at least one photo and click "Add to SharedAlbum"
- The photo briefly appears for the fraction of a second, and you get the error message above. Furthermore, the selected photos have been duplicated in the file folder.
Expected behavior The selected photos should appear in the shared album.
Desktop (please complete the following information):
- OS: Zorin OS 16.2
- Browser Firefox 110.0 (64-bit)
- Version: Nextcloud AIO v4.4.1 (Docker) with Nextcloud 25.0.3
Browser log
[XHR] COPY https://stuss.cloud/remote.php/dav/files/david/Photos/IMG_20230202_171356_2.jpg
[HTTP/2 404 Not Found 175ms]
[ERROR] photos: Failed to add IMG_20230202_171356_2.jpg to shared album Winterurlaub 2023 (david).
Object { level: "2", app: "photos", uid: "david", error: Error }
ConsoleLogger.js:64:10
Addendum: When adding files via the "Albums" menu item, and not "Collaborative albums", the same error message appears, but the files are added to the album. However, they are copied twice into the Photos folder of the current user. Deleting them from there breaks the entire album: The cover photo disappears, and you are presented with the error message "An error occured". Here's the browser logs:
[ERROR] photos: [SharedAlbumContent] Error fetching album files
Object { level: "2", app: "photos", uid: "david", error: TypeError }
photos-main.js:2:328854
Similar to #1558?