Wrong URL in DELETE requests

I just installed nextcloud and have the issue that I can’t delete any files (tried from the photo app).
I see the following in my browser console:

XHR DELETE http://raspberrypi.local/nextcloud/remote.php/dav/files/l0drex/files/l0drex/externalStorage/...

[HTTP/1.1 404 Not Found 225ms]
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:message>File with name //files could not be located</s:message>

My guess is that the URL is wrong, this part looks weird: .../files/l0drex/files/l0drex/....

The instance is running in a directory, not a subdomain. I have followed the instructions for pretty urls. The file that I try to delete is on an external storage device, all files on it have read and write permissions for the www-data group and directories are executable.

This seems to be an error in the photo app, as I can delete images from the file app without any issues.