Open TheNomad11 opened 1 month ago
Hey @TheNomad11, thanks for your report. I'm able to reproduce your bug.
It seems like the server returns an outdated reference object from the cache. We probably need to take care that the the reference cache for files gets invalidated when they get moved or copied.
Cc @juliusknorr as you worked on this in the past.
Which URL format is being used? Wondering with the internal URL we should not see any change in the URL with the move and I'd expect that with any other we should still have the file id as identifier, so maybe that is rather a but in the extraction logic to get the file metadata for the specific link
Which URL format is being used? Wondering with the internal URL we should not see any change in the URL with the move and I'd expect that with any other we should still have the file id as identifier, so maybe that is rather a but in the extraction logic to get the file metadata for the specific link
Exactly, the URL does not change. But the reference response contains the file metadata which contains the file name (which changed) - and apparently this is passed to the viewer for opening the file.
All right, in that case it should be just a matter if invalidating the cache in https://github.com/nextcloud/server/blob/dae7c159f728a90ffa53247d6e033abdae5d2bd6/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php#L30
Describe the bug Links to files break after moving or renaming files
To Reproduce Steps to reproduce the behavior:
Expected behavior The Pdf link loads, as these links are permanant within Nextcloud. They still work after moving and renaming
Server details:
Client details: