Problem with overwriting FIles with same name

I have the problem, that my nextcloud instance does not replace/overwrite a file with the same name, different version. After upload it still shows the old file.
Even deleting and trash the bin does not help.
After upload, the same old file appears, not the newer one.

I am on Nextcloud Hub 10 - 31.0.7

Deleting Broser Cache did not help.

I also did a: sudo -u www-data php /var/www/nextcloud/occ files:scan --all

sudo -u www-data php /var/www/nextcloud/occ files:cleanup
0 orphaned file cache entries deleted
0 orphaned file cache extended entries deleted
0 orphaned mount entries deleted

My log shows no Errors or Fatals at all.

Any Idea?

The only thing that helps, is making an upload with a different filename.
So it has to be some kind of cache problem.

Strange thing - if I rename the file online in cloud, the once old shown file then shows the new version. If I rename it back to the old filename, it shows the old version again.

Deleting the browsers cache and cookies also did not help.
And the problem occurs across the board, no matter if chrome, brave, firefox, safari is used.

Any suggestions?

config:

'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'log_type' => 'file',
  'logfile' => '/var/www/nextcloud-data/nextcloud.log',
  'loglevel' => 0,

review and share log files - nextcloud.log and webserver - likely you find hints there

I found a solution for my problem.

Culprit was Cloudflare.
A regular cach-rule for *.pdf* did not work.

I had to create a Cloudflare Cache Rule for /remote.php/dav/files/

Cloudflare treats the file like a static resource and caches it, even though it’s part of Nextcloud’s dynamic DAV system.

To fix this, create a Cache Rule in Cloudflare:

  • When incoming requests match…
    • URI Path → contains/remote.php/dav/files/
  • Then…
    • Bypass Cache

:white_check_mark: This ensures Cloudflare will never cache files from the Nextcloud DAV system.

1 Like