When one tries to update an attachment with a new local file this is only done when the
local file name is the same as before. If the local file has a different name this will silently
create a new attachment.
After checking the code in
I conclude that update with a different
local file is not supported anymore. This behavior is different from TWiki 4.x. and is somewhat
awkward because the user selected to manage an attachment and has the expectation that
his or her actions are limited to that attachment only.
This feature should either be implemented again (best solution) or an oops should be displayed
when a new attachment was generated. For the later a warning text should also be displayed
in the attachment update UI.
There was a long discussion on how to handle this, please read Item5511
and provide feedback what spec you think is most intuitive.
Thanks for the link. Here is our use case and why I was motivated to look into this and post this bug:
On our intranet TWiki we have a section with reports and documents. There are quite a few
and they are linked into the topic to order them, i.e., users will not scroll down to the twiki attachment list to pick one.
These documents are updated from time to time. Some files have different names when they come in (version/date added, upper/lower case different, spaces instead of underscore,
etc.). The documents are updated by various people, including our secretary.
When one of them forgets to locally rename a file to exactly the name of the attachment in
TWiki before updating the attachment with this file, it will create a new attachment. This is
evil in two ways because
- The user will never know that something went wrong unless he verifies the attachments every time after an upload.
- The user is forced to manually verify and modify the file before uploading which is prone to errors and is a pain to do.
Your arguments to change the spec are sound. best way to change spec:
- Post a feature request in Codev web on twiki.org
- Follow the release process (7 day review cycle) - TWiki:Codev/TWikiReleaseManagementProcess
- Create a patch for TWiki-5.0