Next Question
Could someone help? How do I delete file attachments from a topic? Can you give a step 1, step 2, step 3,... ?
I studied the save script and could not find anything that showed me what to do. Could you tell us what the URL command is? --
In the
FileAttachment doc, it says "It is not possible to delete attached files with the current TWiki implementation. Contact %WEBMASTER% if you need to delete files."
However, this assumes that the web master (which is me) would know how to do this. It suggests that this should be a relatively straight forward thing for the webmaster to do. How do I do it?
After I created a whole mess of attachements to the
WebHome page (which is really ugly in an intollerable way now), I see that in the twiki/pub there is now a directory called
WebHome in which there are all the attachments. If I delete this directory and its contents, what happens? Does Twiki automatically take care of it? Is this how it is done? I tried doing that with one file and ended up with a dead link... about to try them all with the directory....
Okay... now sluething on my own...
Step 1 - under
/pub/<targetweb>, delete the directory containing the attachment files. This directory was created by TWiki and named for the webtopic to which the attachments were attached. (Result = this will make all links dead in the attachment table).
Step 2 - Edit the webtopic.txt file under the
/data/<targetweb> directory. Locate all code starting and ending with
<!--TWikiAttachment--> and delete it. Then upload the file back ot the server. Go to the web topic and refresh the page. (Result = It worked!)
Conclusion - The method that
MartinCleaver outlined below is something that works.
Next Question - Does anyone know of the URL user-interface equivalent that Peter was talking about?
MatthewSimpson - 20 Aug 2001
First Question
Quick question: do I manually delete the attachments? Do I just edit the HTML Attachment Table in the .txt file and remove the file from the filespace?
- TWiki version: 1 dec 2000
- Web server: Apache
- Server OS: Windows NT
Thanks.
--
MartinCleaver - 01 Mar 2001
First Answer
There is an undocumented URL based command to replace a topic version (study the save script and you will know). Doing so will show the attachment table in the edit field. Simply delete the table row of the file to delete, then remove the file from the pub directory.
FYI, attachments under revision control is currently under construction. With that you will also get maintenance features like rename and delete. Stay tuned.
--
PeterThoeny - 05 Mar 2001
Can I ask this again WRT the 01Feb2003 release.
In Codev/ViewCgiScript I uploaded a "too big" graphic, them uploaded a ZIP version
intending to delete the first ... how do I delete the file, not just fom the attachment
table but from the file system?
--
AntonAylward - 09 May 2003
See new
TWikiFAQ entry
DeleteOrRenameAnAttachment
--
PeterThoeny - 09 May 2003