|
File Attachments |
| What Are Attachments Good For? |
|
< < | File Attachments can be used to create powerful customized groupware solutions, like file sharing and document management systems, and quick Web page authoring. |
> > | File Attachments can be used to archive data, or to create powerful customized groupware solutions, like file sharing and document management systems, and quick Web page authoring. |
| Document Management System |
|
-
- 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.
- TWiki can limit the file size. This is defined by the
%ATTACHFILESIZELIMIT% variable of the TWikiPreferences, currently set at 10000 KB.
- It's not recommended to upload files greater than a few hundred K through a browser. Large files can be extremely slow-loading, and often time out. Use an FTP site for large file uploads.
|
|
> > |
- Automatic attachments:
- When enabled, all files in a topic's attachment directory are shown as attachments to the topic - even if they were directly copied to the directory and never attached by using an 'Attach' link. This is a convenient way to quickly "attach" files to a topic without uploading them one by one; although at the cost of losing audit trail and version control.
- To enable this feature, set the {AutoAttachPubDir} configuration option.
- NOTE: The automatic attachment feature can only be used by an administrator who has access to the server's file system.
|
| Downloading Files |
|
- Once a file is attached it can be referenced in the topic. Example:
-
Attach file: Sample.txt
-
Edit topic and enter: %ATTACHURL%/Sample.txt
|
|
< < |
-
-
Preview : %ATTACHURL%/Sample.txt text appears as: https://moglen.law.columbia.edu/twiki/pub/TWiki/FileAttachment/Sample.txt, a link to the text file.
|
> > |
-
-
Preview : %ATTACHURL%/Sample.txt text appears as: /twiki/pub/TWiki/FileAttachment/Sample.txt, a link to the text file.
|
|
- To reference an attachment located in another topic, enter:
|
|
< < |
-
-
%PUBURL%/%WEB%/OtherTopic/Sample.txt (if it's within the same web)
-
%PUBURL%/Otherweb/OtherTopic/Sample.txt (if it's in a different web)
|
> > |
-
-
%PUBURLPATH%/%WEB%/OtherTopic/Sample.txt (if it's within the same web)
-
%PUBURLPATH%/Otherweb/OtherTopic/Sample.txt (if it's in a 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.
|
|
< < | |
> > | |
|
- 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
|
|
< < |
-
-
Preview : text appears as , an image.
|
> > |
-
-
Preview : text appears as /twiki/pub/TWiki/FileAttachment/Smile.gif, 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 Controls |
|
< < | Clicking on a Manage link takes you to a new page that looks like this: |
> > | Clicking on a Manage link takes you to a new page that looks a bit like this (depending on what skin is selected): |
|
|
|
< < | |
| Update attachment Sample.txt |
|
< < | |
> > | |
| Version | Action | Date | Who | Comment |
---|
|
|
< < | |
> > | |
| |
|
> > | |
| |
|
< < | |
> > |
Previous upload |
Sample.txt (TWikiContributor)
|
Select a new local file to update this attachment. |
|
| |
|
|
< < | |
> > | |
| |
|
< < | |
> > | |
| |
|
> > | |
| |
|
|
< < | |
> > | |
| |
|
< < | |
> > | |
| |
|
> > | Attachments will not be shown in topic view page. | |
| |
|
|
< < | |
> > | |
| |
|
< < | |
> > | |
|
|
| Known Issues
- Unlike topics, attachments are not locked during editing. As a workaround, you can change the comment to indicate an attachment file is being worked on - the comment on the specific version isn't lost, it's there when you list all versions of the attachment.
|
|
> > |
- Attachments are not secured. Anyone can read them if they know the name of the web, topic and attachment.
|
| |
|
< < |
META FILEATTACHMENT | attr="" comment="Just a sample" date="964294620" name="Sample.txt" path="C:\DATA\Sample.txt" size="30" user="thoeny" version="" |
META FILEATTACHMENT | attr="" comment="Smiley face" date="964294680" name="Smile.gif" path="C:\DATA\Smile.gif" size="94" user="thoeny" version="" |
|
> > | Related Topics: UserDocumentationCategory
META FILEATTACHMENT | attr="" comment="Just a sample" date="964294620" name="Sample.txt" path="C:\DATA\Sample.txt" size="30" user="TWikiContributor" version="" |
META FILEATTACHMENT | attr="" comment="Smiley face" date="964294680" name="Smile.gif" path="C:\DATA\Smile.gif" size="94" user="TWikiContributor" version="" |
|