archive_me1Add my vote for this tag create new tag
, view all tags
Pre TWikiReleaseSpring2001 TWiki has topics under revision control, but not attachments. This is the documentation for having attachments under revision control. To be moved to TWiki06x00 Web when released.

Table of contents:

++ Issues

Ongoing issues, roughly in priority order Status is: D (Done), U (Uploaded)

Issue Status Comment/progress
More to GenericMetaDataStoreForTopics U Made code a lot cleaner
Most functionality now in, next step, lots testing and adding to this issue lists  
Move attachment broken, missed out version arg U  
Move attachment can fail if there are locks, also then offers to move topic U  
Many FIXMEs to deal with (in attach, upload, Store.pm * Attach.pm   Number: 29-Mar 33, 22-May 20
Not working fully on Windows. Size missing for attachment, which causes other problems.    
Problem moving attachment where size = 0    
Indicate if file uploaded is same as previous version  

Fix unit tests for Store.pm and upload   See UnitTestSuite, needs to be done again!

How attachment are stored in the topic

Previously marked up HTML was used for the attachment information. Now a meta variable (see GenericMetaDataStoreForTopics) is used (an intermediate step that was in alpha used a slightly different FILEATTACHMENT variable). Uploading an attachment or editing a topic causes the format to be upgraded automatically - on viewing a temporary in memory conversion is done. Example of meta variable:

%META:FILEATTACHMENT{name="a.txt" version="1.1" path="c:\tmp\a.txt" size="18" date="20 Apr 2001 - 09:16" user="People.JohnTalintyre" comment="Sample text file" attr=""}%

The file attachment lines get expanded to table rows, using | | | syntax, which are then rendered as normal into a table. There are headings for the table and a footer is added if there are hidden attachments.

Note that the filename is appended at end of URL for viewing, so that browsers can use the extension to decide on the relavent application.

Moving attachments

An attachment can be moved from one topic to another. Click Action in the attachment table, then click Move Attachment. Choose the Web and Topic to move to and submit.

Differences to topics under RCS

If a topic is changed within the lock time (default 60 minutes), the most recent revision is updated. This is not the case with attachments, a new revision is always formed.

"Un-documented" cmd parameter is not support for attachments. So the last upload can't be deleted.

Suffix for determining ascii formats

TWiki.cfg contains:

#                   Defines which attachments will be treated as ASCII in RCS
$attachAsciiPath  = "\.(txt|html|xml|pl)\$";

for deteriming which files are ASCII, others are stored as binary in RCS.

Where are files stored?

data/aweb/ATopic.txt topic text
data/aweb/ATopic.txt,v topic repository
pub/aweb/ATopic/aAttachment.txt file attachment
pub/aweb/ATopic/aAttachment.txt,v file attachment repository

There are some potential issues to storing attachment history in the pub directory - see AttachmentsUnderRevisionControlHistory.

For the future

See AttachmentsUnderRevisionControlPostSpring2001

Also see

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip twiki.zip   manage 0.1 K 2001-03-28 - 19:52 JohnTalintyre Empty - now in CVS
Edit | Attach | Watch | Print version | History: r40 < r39 < r38 < r37 < r36 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r40 - 2005-02-15 - SamHasler
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.