Problem/Motivation
The first time I replace a file, this works. When I try to replace the file again with a new file, nothing happens. I've tried clearing the cache then replacing the file but it still won't work.
Any tips or suggestions would be greatly appreciated.
Steps to reproduce
1. Replace an existing file on a media entity.
2. Replace the file again on the same media entity with a different file
Comments
Comment #2
campbellt_ commentedComment #3
bkosborneI just tried this and I could not reproduce it.
Note that your browser or CDN may be caching the original file. Perform a hard refresh or disable caching in your browser to confirm.
Comment #4
anybodyComment #5
drurian commentedI'm having the same issue on the Acquia servers but not locally. I have to manually delete files to make it work.
Note: this seems to be happening only if Overwrite original file option is checked. However, with this option unchecked, if the replacement file has the same name as the old file, Drupal adds a number to its name and the old file still exists.
Comment #6
wylbur commentedWe ran into this issue during testing. We checked the server file directory, and the file was updated, but the old file was cached within the browser cache.
With so many levels of powerful caching, this can really be tricky!
The module does provide messages about the created file, so this is working.
Comment #7
usmanjutt84Hi, I can confirm #6 by Wylbur. I updated a file with the "Overwrite original file" check enabled and it didn't work on the spot while it started working after couple of minutes.
Comment #8
bkosborneThis is a caching problem. Check out the project overview page which has lots of details about the cache issue.