File manager upload rename problem

Bugs » #13


This section on the Community is no longer supported, in favour of Wikidot's Official Feedback Site.

It is retained here for archiving purposes.

Posted by Phil ChettPhil Chett on 07 Jun 2008 10:47, last edited on 04 Mar 2009 09:35

This bug is open

Description

Simply put, when uploading a file to replace a pre-existing one of the same name, in most cases the file is not overwritten.

This is a cache issue in the Wikidot engine. Files are first uploaded to the Wikidot file server, and when first accessed/viewed, they are copied to the Wikidot cache, and accessed from there.
When files are deleted, they are removed from the Wikidot file server, and then removed from the Wikidot cache at a later date. This means that whilst you have deleted a file from the server, it can potentially continue to be accessed.
Similarly, this is also the case when files are overwritten. Files are overwritten on the Wikidot server, but are not removed from the Wikidot cache. So when you overwrite a file and go to access it, the old version of the file will be accessed instead of the new one.
Files are only transfered to the Wikidot cache the first time they are accessed. So if you upload a file and delete or overwrite it before it is first accessed, then the new/updated file will be transfered to the Wikidot cache, and no problems will arise.

If files were deleted from the cache as soon as they are overwritten, renamed or deleted from the Wikidot file server, this problem would cease to exist.

First reported by hessbhessb in this post

How to reproduce

There are two ways to reproduce this error.

The first way involves deleting the file:

  1. Upload a file with a given name (i.e. test.txt);
  2. Open/View the uploaded file;
  3. Delete it;
  4. Upload a different file with the same given name;
  5. Open/View the new uploaded file.

The second way involves overwriting the file:

  1. Upload a file with a given name (i.e. test.txt);
  2. Open/View the uploaded file;
  3. Upload a different file with the same given name;
  4. Click "overwrite" on the message box that pops up (it is asking you if you want to overwrite an existing file);
  5. Open/View the new uploaded file.

On opening the file for a second time, the first version is displayed, NOT the second one

Browsers

All

Workarounds?

None — you must give the new file a new name.

Rate this Bug

Rate the urgency of this bug. If you think it is more urgent and important than it's current rating suggests, rate it up.

rating: +5+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.