updated file uploads are not working

updated file uploads are not working

by Damon Blanchette -
Number of replies: 2
Hello,
We seem to be able to upload files and link to them with a new resource on the course main page, but updating the files does not work.

For example, a teacher uploads a syllabus, then links to it. A week later, they decide to change the syllabus a bit, then upload it again, same file name. When downloaded through the resource link on the course main page, the old file still gets downloaded. What happened to the new one? In the File page, when you upload a file with the same name as one that's already there, you get no error messages. It looks like it overwrites the old one, but it doesn't. Even when I change the name of the old file, the resource link on the course page automatically changes to that one, instead of staying the same and using the new file.

What can I do? Any ideas? Is there a way to make it so that when uploading a file with the same name as one that's already there it overwrites the old one instead of doing nothing (and the resource link still works)?
Thanks,
Damon
Average of ratings: -
In reply to Damon Blanchette

Re: updated file uploads are not working

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Damon,

Actually, uploading a file with the same name as one that's already there does result in the old one being overwritten. The reason why the updated file is not displayed is because of browser caching. Please try viewing the file on a different computer or waiting 24 hours.

For more information on browser caching, please check the discussion overwriting resource files.

In reply to Helen Foster

Re: updated file uploads are not working

by Damon Blanchette -
Thank you for the link Helen. I tried a whole bunch of things, and it appears the one that worked was deleting my browser's cache. I also changed the filelifetime variable in file.php to 60 seconds instead of 24 hours, so that might help as well.