Difference: FileAttachment (r5 vs. r4)

The latest version of FileAttachments includes attachments under revision control. It's in the 01 Sep 2001 TWiki release.

File Attachments

Each topic can have files attached to it. This is similar to an e-mail attachment. Just use your browser to upload or download a file. Attachments are stored under revision control - no upload is lost.


What Are Attachments Good For?

Each topic can have files attached to it. This is similar to an e-mail attachment. Just use your browser to upload or download a file.

Document Management System

  • To upload: Click on the Attach link at the bottom of each page. A form is shown where you can browse for a file and upload it. The uploaded file will show up in the FileAttachment table. document management system: distribution, revision
  • To download: Click on the file in the FileAttachment table.

FileAttachment table

File Sharing

  • share files: applications, data files; recommended for light use

Page Content

  • on-site use: linking to graphics, docs

Uploading Files

  • To upload: Click on the Attach link at the bottom of each page. A form is shown where you can browse for a file and upload it. The uploaded file will show up in the File Attachment table.
  • Files of any type can be uploaded. Some files that might impose a security risk are renamed, i.e. *.php files are renamed to *.php.txt.
  • Currently there is no file size limit besides the disk space on the server.
  • The previous upload path is retained for convenience. In case you make some changes to the local file and want to upload it again you can copy the previous upload path into the Local file field.

Downloading Files

  • To download: Click on the file in the File Attachment table.
  • There is no access control on individual attachments. If you need to have this type of control create separate topics and define access restrictions on the topics.

Moving Attachment Files

An attachement can be moved between topics. To do this click action on the attachment to be moved. On the subsequent page select the new Web and Topic, the click Move. The attachment and its version history is moved. The original location is stored in the topic meta data.

Deleting Attachments

It is not possible to delete attached files with the current TWiki implementation. However, they can be moved to another topic. You may care to have a topic Trash.TrashAttachments - move attachments that are no longer wanted here.

Linking to Attached Files

  • Once a file is attached it can be referenced in the topic. Example:
    • Attach file: Sample.txt
    • Edit topic and write text: %ATTACHURL%/Sample.txt
    • Text is shown as: http://infra.inp.nsk.su/twiki/pub/TWiki/FileAttachment/Sample.txt, ex: it is a link.
    • To reference an attachment located in another topic write text:
      • %PUBURL%/%WEB%/OtherTopic/Sample.txt (for same web)
      • %PUBURL%/Otherweb/OtherTopic/Sample.txt (for different web)
  • Attached HTML files and text files can be inlined in a topic. Example:
    • Attach file: Sample.txt
    • Edit topic and write text: %INCLUDE{"%ATTACHURL%/Sample.txt"}%
    • Content of attached file is shown inlined.
    • Read more in IncludeTopicsAndWebPages.
  • GIF, JPG and PNG images can be attached and shown embedded in a topic. Example:
    • Attach file: Smile.gif
    • Edit topic and write text: %ATTACHURL%/Smile.gif
    • Text is shown as: Smile.gif , it shows up as an image.

File Attachment Contents Table

Is a table that looks like this:

FileAttachment: Action: Size: Date: Who: Comment:
(attached file) (view, update, add) (file size) (upload date) (uploaded by) (file comment)
Attachment:Action:Size:Date:Who:Comment:
Sample.txtaction 30 22 Jul 2000 - 19:37 PeterThoeny Just a sample
Smile.gifaction 94 22 Jul 2000 - 19:38 PeterThoeny Smiley face

Action is:

File Attachment Control Page

  • view: View file. This is the same as clicking on the filename.
  • update: Update file that is already attached.
  • add: Add a new attachment.

Clicking on an action link takes you to a new page that looks like this:

Remarks

Attachment:Action:Size:Date:Who:Comment:Attribute:
Sample.txtaction 30 22 Jul 2000 - 19:37 PeterThoeny Just a sample  
Smile.gifaction 94 22 Jul 2000 - 19:38 PeterThoeny Smiley face  

Update attachment Sample.txt

Version:Action:Date:Who:Comment:
1.1 view 2001.08.30.09.28.56 PeterThoeny  
Previous
upload:
C:\DATA\Sample.txt (PeterThoeny)
Local file:
Comment:
Link: Create a link to the attached file at the end of the topic.
Hide file: Hide attachment in normal topic view.
Help text ...

Topic FileAttachment . {

| | Move attachment | Cancel }
  • Once a file is attached it can be referenced in the topic by %ATTACHURL%/{filename} . Example:
  • GIF and JPG images can be attached and shown in the text like this:
    • Attach file: Smile.gif
    • Edit topic and write text: %ATTACHURL%/Smile.gif
    • Text is shown as: Smile.gif , i.e. it shows up as an image.
  • It is not possible to delete attached files with the current TWiki implementation. Contact P.B.Cheblakov@inpREMOVE.nsk.su if you need to delete files.

The first table is a list of all attachments, including their attributes. A h means the attachment is hidden i.e. isn't listed when viewing a topic.

The second table is all the versions of the attachment. Click on view to see that version, if it is the most recent version you'll be taken to a URL that always displays the latest version, which is usually what you want to email out.

If you just want to change the comment on an attachment - enter a new comment and then press Change properties. Note that the comment listed against the specific version will not change, however the comment displayed when viewing the topic does change.

Similarly to hide/unhide an attachment click in the Hide file checkbox are press Change properties.

Known Issues

  • You can't lock an attachment for editing. However, you may want to change the comment to indicate you are doing that - the comment on the specific version isn't lost, you can see it when listing all the versions of an attachments.
Attachment SortActionSizeDateWhoComment
Text Sample.txtmanage 0.1 K 22 Jul 2000 - 19:37 UnknownUser Just a sample
GIF Smile.gifmanage 0.1 K 22 Jul 2000 - 19:38 UnknownUser Smiley face

 
This site is powered by the TWiki collaboration platformCopyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.FileAttachment.