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?
Document Management System
- document management system: distribution, revision
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://wiki.gnhlug.org/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: , it shows up as an image.
File Attachment Contents Table
Is a table that looks like this:
File Attachment Control Page
Clicking on an action link takes you to a new page that looks like this:
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.