• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6533: Attachment update creates new attachment when local filename not the same

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine Upload Normal New   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


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 TWiki/UI/Upload.pm 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.

-- TWiki:Main/StefanWalter - 2010-07-27

There was a long discussion on how to handle this, please read Item5511 and provide feedback what spec you think is most intuitive.

-- TWiki:Main.PeterThoeny - 2010-07-28

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

  1. The user will never know that something went wrong unless he verifies the attachments every time after an upload.
  2. The user is forced to manually verify and modify the file before uploading which is prone to errors and is a pain to do.

-- TWiki:Main.StefanWalter - 2010-08-18

Your arguments to change the spec are sound. best way to change spec:

  1. Post a feature request in Codev web on twiki.org
  2. Follow the release process (7 day review cycle) - TWiki:Codev/TWikiReleaseManagementProcess
  3. Create a patch for TWiki-5.0

-- TWiki:Main.PeterThoeny - 2010-08-26

Summary Attachment update creates new attachment when local filename not the same
ReportedBy TWiki:Main.StefanWalter
Codebase 5.0.0
SVN Range TWiki-5.0.0, Tue, 06 Jul 2010, build 19208
AppliesTo Engine
Component Upload
Priority Normal
CurrentState New


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2010-08-26 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback