Each topic can have files attached to it, similar to an email attachment. Use your browser to upload or download a file.
Attachments are stored under revision control: uploads can never be lost, and changes can be made to files with a rollback option to any previous version always available.
What Are Attachments Good For?
File Attachments can be used to create powerful groupware solutions - file sharing, document management - and for speedy Web authoring.
Document Management System
- You can use Attachments to store and retrieve documents (in any format, with associated graphics, and other media files); attach documents to specific TWiki topics; collaborate on documents with full revision control; distribute documents on a need-to-know basis using; create a central reference library that's easy to access and manage by an entire user group.
- For file sharing, FileAttachments on a series of topics can be used to quickly create a well-documented, categorized digital download center for all types of files: documents; graphics and other media; drivers and patches; applications; anything you can safely upload!
- Through your Web browser, you can easily upload graphics (or sound files, or anything else you want to embed on a page) and place them anywhere in on a single page, or for use across a web, or site-wide.
- NOTE: You can also add graphics - any files - directly, typically by FTP upload. This requires server access, and may be more convenient if a large number of files, or a particular directory location, is required. These files can't be managed using browser-based Attachment controls.
- 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, ex:
*.php files are renamed to
- 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.
- NOTE: There is no access control on individual attachments. If you need this type of control, create separate topics and define access restrictions per topic.
Moving Attachment Files
An attachement can be moved between topics. To do this click Action
on the attachment to be moved. On the control page, select the new web and topic, the click Move
. The attachment and its version history are moved. The original location is stored as topic Meta Data
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
- To reference an attachment located in another topic, write text:
%PUBURL%/%WEB%/OtherTopic/Sample.txt (for the same web)
%PUBURL%/Otherweb/OtherTopic/Sample.txt (for adifferent web)
- Attached HTML files and text files can be inlined in a topic. Example:
- Attach file:
- Edit topic and write text:
- GIF, JPG and PNG images can be attached and shown embedded in a topic. Example:
- Attach file:
- Edit topic and write text:
- Preview - text appears as , an image.
File Attachment Contents Table
Files attached to a topic are displayed in a directory table, displayed at the bottom of the page, or optionally, hidden and accessed when you click Attach
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. An
h means the attachment is hidden, it 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's the most recent version, you'll be taken to an URL that always displays the latest version, which is usually what you want.
- To change the comment on an attachment, enter a new comment and then click Change properties. Note that the comment listed against the specific version will not change, however the comment displayed when viewing the topic does change.
- To hide/unhide an attachment, enable the Hide file checkbox, then click Change properties.
- 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.