head	1.19;
access;
symbols;
locks; strict;
comment	@# @;


1.19
date	2010.06.23.05.52.36;	author TWikiContributor;	state Exp;
branches;
next	1.18;

1.18
date	2008.08.03.22.17.51;	author TWikiContributor;	state Exp;
branches;
next	1.17;

1.17
date	2008.01.22.03.21.35;	author TWikiContributor;	state Exp;
branches;
next	1.16;

1.16
date	2007.01.16.04.11.56;	author TWikiContributor;	state Exp;
branches;
next	1.15;

1.15
date	2006.04.01.05.55.06;	author TWikiContributor;	state Exp;
branches;
next	1.14;

1.14
date	2006.02.01.12.01.16;	author TWikiContributor;	state Exp;
branches;
next	1.13;

1.13
date	2004.05.08.21.52.36;	author PeterThoeny;	state Exp;
branches;
next	1.12;

1.12
date	2004.01.12.07.34.07;	author PeterThoeny;	state Exp;
branches;
next	1.11;

1.11
date	2003.12.26.03.58.00;	author PeterThoeny;	state Exp;
branches;
next	1.10;

1.10
date	2002.05.04.15.32.07;	author MikeMannix;	state Exp;
branches;
next	1.9;

1.9
date	2001.12.04.10.19.58;	author PeterThoeny;	state Exp;
branches;
next	1.8;

1.8
date	2001.12.03.10.12.00;	author MikeMannix;	state Exp;
branches;
next	1.7;

1.7
date	2001.09.14.09.21.07;	author MikeMannix;	state Exp;
branches;
next	1.6;

1.6
date	2001.09.07.03.17.51;	author MikeMannix;	state Exp;
branches;
next	1.5;

1.5
date	2001.09.07.02.05.45;	author PeterThoeny;	state Exp;
branches;
next	1.4;

1.4
date	2001.08.30.09.07.32;	author MikeMannix;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.29.03.09.36;	author PeterThoeny;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.19.00.25.28;	author PeterThoeny;	state Exp;
branches;
next	1.1;

1.1
date	99.06.13.07.51.57;	author thoeny;	state Exp;
branches;
next	;


desc
@none
@


1.19
log
@buildrelease
@
text
@%META:TOPICINFO{author="TWikiContributor" date="1277272356" format="1.1" version="19"}%
%STARTINCLUDE%
---+ File Attachments

_Each topic can have one or more files of any type attached to it by using the Attach screen to upload (or download) files from your local PC. Attachments are stored under revision control: uploads are automatically backed up; all previous versions of a modified file can be retrieved._ 

%TOC%

---++ What Are Attachments Good For?

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

   * 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 [[#AttachmentAccess][need-to-know basis]] using web and topic-level access control; create a central reference library that's easy to share with an user group spread around the world.

---+++ File Sharing

   * 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!

---+++ Web Authoring

   * Through your Web browser, you can easily upload graphics (or sound files, or anything else you want to link to on a page) and place them on a single page, or use them across a web, or site-wide.
      * __NOTE:__ You can also add graphics - any files - directly, typically by FTP upload. This requires FTP access, and may be more convenient if you have a large number of files to load. FTP-ed files can't be managed using browser-based Attachment controls. You can use your browser to create TWikiVariables shortcuts, like this %<nop>H% = %H%.

---++ Uploading Files

   * Click on the ==Attach== link at the bottom of the page. The =Attach= screen lets you browse for a file, add a comment, and upload it. The uploaded file will show up in the [[#FileAttachmentTable][File Attachment table]].
      * __NOTE:__ The topic must already exist. It is a two step process if you want to attach a file to a non-existing topic; first create the topic, then add the file attachment.
      * Any type of file can be uploaded. Some files that might pose a security risk are renamed, ex: =*.php= files are renamed to =*.php.txt= so that no one can place code that would be read in a .php file. 
      * 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 =%<nop>ATTACHFILESIZELIMIT%= variable of the TWikiPreferences, currently set at %ATTACHFILESIZELIMIT% KB.
         * %X% 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 {AutoAttachPubFiles} 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

   * Click on the file in the [[#FileAttachmentTable][File Attachment table]].
#AttachmentAccess

   * %X% _NOTE:_ There is no access control on individual attachments. If you need control over single files, create a separate topic per file and set topic-level [[TWikiAccessControl][access restrictions]] for each.

---++ Moving Attachment Files

An attachment can be moved between topics. 
   * Click ==Manage== on the Attachment to be moved.
   * On the control screen, select the new web and/or topic.
   * Click ==Move==. The attachment and its version history are moved. The original location is stored as [[TWikiMetaData][topic Meta Data]].

---++ Deleting Attachments

Move unwanted Attachments to web =Trash=, topic =TrashAttachment=.

---++ Linking to Attached Files

   * Once a file is attached it can be referenced in the topic. Example:
      1. ==Attach== file: =Sample.txt=
      1. ==Edit== topic and enter: =%<nop>ATTACHURL%/Sample.txt=
      1. ==Preview==: =%<nop>ATTACHURL%/Sample.txt= text appears as: %PUBURLPATH%/%WEB%/%TOPIC%/Sample.txt, a link to the text file.

   * To reference an attachment located in another topic, enter:
      * =%<nop>PUBURLPATH%/%<nop>WEB%/OtherTopic/Sample.txt= (if it's within the same web)
      * =%<nop>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:
      1. ==Attach== file: =Sample.txt=
      1. ==Edit== topic and write text: =%<nop>INCLUDE{"%<nop>ATTACHURL%/Sample.txt"}%=
         * Content of attached file is shown inlined.
         * Read more about INCLUDE in [[VarINCLUDE][TWiki<nop>Variables]]

   * GIF, JPG and PNG images can be attached and shown embedded in a topic. Example:
      1. ==Attach== file: =Smile.gif=
      1. ==Edit== topic and write text: =%<nop>ATTACHURL%/Smile.gif=
      1. ==Preview==: text appears as %PUBURLPATH%/%WEB%/%TOPIC%/Smile.gif, an image.

#FileAttachmentTable
---++ 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*.

<div class="twikiAttachments">
<table summary="Topic attachments" style="border-width:1px;" cellspacing="0" id="twikiAttachmentsTable" cellpadding="0" class="twikiTable" rules="rows" border="1"><caption>Topic attachments</caption><tr class="twikiTableEven"><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;" class="twikiFirstCol"> <a rel="nofollow" href="%TOPIC%?sortcol=0;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">I</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=1;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Attachment</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=2;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Action</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=3;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Size</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=4;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Date</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=5;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Who</a> </th><th bgcolor="#ffffff" align="center" valign="middle" style="text-align:center;vertical-align:middle;"> <a rel="nofollow" href="%TOPIC%?sortcol=6;table=1;up=0#sorted_table" style="color:#0066cc" title="Sort by this column">Comment</a> </th></tr>
<tr class="twikiTableOdd"><td bgcolor="#ffffff" align="center" valign="top" style="text-align:center;vertical-align:top;" class="twikiFirstCol"> <img width="16" alt="txt" align="top" src="%PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/txt.gif" height="16" border="0" /><span class="twikiHidden">txt</span> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="/twiki4/MAIN/bin/viewfile/TWiki/FileAttachment?rev=;filename=Sample.txt">Sample.txt</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="/twiki4/MAIN/bin/attach/TWiki/FileAttachment?filename=Sample.txt&amp;revInfo=1" title='change, update, previous revisions, move, delete...'rel='nofollow'>manage</a> </td><td bgcolor="#ffffff" align="right" valign="top" style="text-align:right;vertical-align:top;"> 0.1&nbsp;K </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> 22 Jul 2000 - 19:37 </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="TWikiContributor" class="twikiLink">TWikiContributor</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> Just a sample </td></tr>
<tr class="twikiTableEven"><td bgcolor="#ffffff" align="center" valign="top" style="text-align:center;vertical-align:top;" class="twikiFirstCol twikiLast"> <img width="16" alt="gif" align="top" src="%PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/gif.gif" height="16" border="0" /><span class="twikiHidden">gif</span> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="/twiki4/MAIN/bin/viewfile/TWiki/FileAttachment?rev=;filename=Smile.gif">Smile.gif</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="/twiki4/MAIN/bin/attach/TWiki/FileAttachment?filename=Smile.gif&amp;revInfo=1" title='change, update, previous revisions, move, delete...'rel='nofollow'>manage</a> </td><td bgcolor="#ffffff" align="right" valign="top" style="text-align:right;vertical-align:top;" class="twikiLast"> 0.1&nbsp;K </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> 22 Jul 2000 - 19:38 </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="TWikiContributor" class="twikiLink">TWikiContributor</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> Smiley face </td></tr>
</table></div><!--//twikiAttachments-->

---++ File Attachment Controls

Clicking on a ==Manage== link takes you to a new page that looks a bit like this (depending on what [[TWikiSkins][skin]] is selected):

<div class="twikiFormSteps">
<div class="twikiFormStep">
<h3><a name="Attach_new_file"></a> Attach new file </h3>
<p />
Select a new local file to update attachment <code>Sample.txt</code> <span class="twikiGrayText">(<a href="#" class="twikiLink">UploadingUser</a>)</span><br />Upload up to 10000 KB.
<p />
<input class="twikiInputField" type="file" name="filepath" value="Sample.txt" size="30" /><input type="hidden" name="filename" value="Sample.txt" />
</div><!-- /twikiFormStep-->
<div class="twikiFormStep">
<h3><a name="Comment"></a> Comment </h3>
<p />
Describe the file so other people know what it is.
<p />
<input class="twikiInputField" type="text" name="filecomment" value="Just a sample" maxlength="256" size="50" />
</div><!-- /twikiFormStep-->
<div class="twikiFormStep">
<h3><a name="Properties"></a> Properties </h3>
<p />
<input type="checkbox" class="twikiCheckbox" id="createlink" name="createlink"  /><label for="createlink">Create a link to the attached file</label> <span class="twikiGrayText">Images will be displayed, for other attachments a link will be created.</span>
<p />
<input type="checkbox" class="twikiCheckbox" id="hidefile" name="hidefile"  /><label for="hidefile">Do not show attachment in table</label> <span class="twikiGrayText">Attachments will not be shown in topic view page.</span>
</div><!-- /twikiFormStep--><div class="twikiFormStep twikiLast"><input type="submit" class="twikiButton" name="changeproperties" value='Change comment and properties only' /></div><!-- /twikiFormStep-->
</div><!-- /twikiFormSteps-->
<a name="topic-actions"> </a><div class="patternTopicActions"><div class="patternTopicAction" style="margin-top:-1px;"><span class="patternActionButtons"> <input type="submit" class="twikiSubmit" value='Upload file' /> or <a href="#" title='Back to topic' accesskey='c' rel='nofollow'><span class='twikiAccessKey'>C</span>ancel</a></span></div></div><!--/patternTopicActions-->


   * 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==.

---++ 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 by default. Anyone can read them if they know the name of the web, topic and attachment. Ask your TWiki administrator if TWiki is [[TWikiAccessControl#SecuringAttachments][configured to secure attachments]].

%STOPINCLUDE%

__Related Topics:__ UserDocumentationCategory, TWikiAccessControl

%META:FILEATTACHMENT{name="Sample.txt" attr="" comment="Just a sample" date="964294620" path="C:\DATA\Sample.txt" size="30" user="TWikiContributor" version=""}%
%META:FILEATTACHMENT{name="Smile.gif" attr="" comment="Smiley face" date="964294680" path="C:\DATA\Smile.gif" size="94" user="TWikiContributor" version=""}%
@


1.18
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="18"}%
d19 1
a19 1
   * 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!
d44 1
a44 1
   * %X% _NOTE:_ There is no access control on individual attachments. If you need control over single files, create a separate topic per file and set topic-level [[TWikiDocumentation#TWikiAccessControl][access restrictions]] for each.
d51 1
a51 1
   * Click ==Move==. The attachment and its version history are moved. The original location is stored as [[TWikiDocumentation#Meta_Data_Definition][topic Meta Data]].
d129 2
a130 2
   * Attachments are not secured. Anyone can read them if they know the name of the web, topic and attachment.
   
d133 1
a133 1
__Related Topics:__ UserDocumentationCategory
@


1.17
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="17"}%
d36 1
a36 1
      * To enable this feature, set the {AutoAttachPubDir} configuration option.
@


1.16
log
@buildrelease
@
text
@d1 1
a1 2
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="16"}%
%TOC%
d3 1
a3 1
---# File Attachments
d7 2
d86 2
a87 2
<tr class="twikiTableOdd"><td bgcolor="#ffffff" align="center" valign="top" style="text-align:center;vertical-align:top;" class="twikiFirstCol"> <img width="16" alt="txt" align="top" src="%PUBURL%/%TWIKIWEB%/TWikiDocGraphics/txt.gif" height="16" border="0" /><span class="twikiHidden">txt</span> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="/twiki4/MAIN/bin/viewfile/TWiki/FileAttachment?rev=;filename=Sample.txt">Sample.txt</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="/twiki4/MAIN/bin/attach/TWiki/FileAttachment?filename=Sample.txt&amp;revInfo=1" title='change, update, previous revisions, move, delete...'rel='nofollow'>manage</a> </td><td bgcolor="#ffffff" align="right" valign="top" style="text-align:right;vertical-align:top;"> 0.1&nbsp;K </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> 22 Jul 2000 - 19:37 </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> <a href="TWikiContributor" class="twikiLink">TWikiContributor</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;"> Just a sample </td></tr>
<tr class="twikiTableEven"><td bgcolor="#ffffff" align="center" valign="top" style="text-align:center;vertical-align:top;" class="twikiFirstCol twikiLast"> <img width="16" alt="gif" align="top" src="%PUBURL%/%TWIKIWEB%/TWikiDocGraphics/gif.gif" height="16" border="0" /><span class="twikiHidden">gif</span> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="/twiki4/MAIN/bin/viewfile/TWiki/FileAttachment?rev=;filename=Smile.gif">Smile.gif</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="/twiki4/MAIN/bin/attach/TWiki/FileAttachment?filename=Smile.gif&amp;revInfo=1" title='change, update, previous revisions, move, delete...'rel='nofollow'>manage</a> </td><td bgcolor="#ffffff" align="right" valign="top" style="text-align:right;vertical-align:top;" class="twikiLast"> 0.1&nbsp;K </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> 22 Jul 2000 - 19:38 </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> <a href="TWikiContributor" class="twikiLink">TWikiContributor</a> </td><td bgcolor="#ffffff" align="left" valign="top" style="text-align:left;vertical-align:top;" class="twikiLast"> Smiley face </td></tr>
@


1.15
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="15"}%
d83 5
a87 7
<blockquote class="twikiAttachments">
<table border="1" cellspacing="0" cellpadding="1"> 
<tr><th align="center" bgcolor="#99CCCC" class="twikiFirstCol"><strong>I</strong></th><th align="center" bgcolor="#99CCCC"><strong>Attachment</strong></th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th></tr>
<tr><td class="twikiFirstCol">%ICON{"txt"}%</td><td><a href="%SCRIPTURLPATH{viewfile}%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>     </td><td>  <a href="%SCRIPTURLPATH{attach}%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a>     </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>  Just a sample  </td></tr>
<tr><td class="twikiFirstCol">%ICON{"bmp"}%</td><td><a href="%SCRIPTURLPATH{"viewfile"}%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>     </td><td>  <a href="%SCRIPTURLPATH{attach}%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>     </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>  Smiley face  </td></tr>
</table>
</blockquote>
d93 25
a117 70
<blockquote style="background-color:#f0f0f0">
<form>
<table border="1" cellspacing="0" cellpadding="20"><tr><td>
<nop><h2>Update attachment <code>Sample.txt</code></h2>
<div class="twikiAttachments patternPrevious">
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong>Version</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th></tr>
<tr><td>  1   </td><td>  <a href="%SCRIPTURLPATH{"viewfile"}%/%WEB%/%TOPIC%?rev=1&amp;filename=Sample.txt">view</a>  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>    Just a sample    </td></tr>
</table>
</div>
<p />
<div class="patternVersatileTable">
<table><tr>
  <th class="patternOldCol">Previous upload</th>
  <td class="patternOldCol">
   <code>Sample.txt</code> <span class="twikiGrayText">(<a href="http://visiblearea.com/devtwiki/bin/view/Main/TWikiContributor" class="twikiLink">TWikiContributor</a>)</span>
  </td>
  <td class="patternHelpCol">Select a new local file to update this attachment.</td>
 </tr> 
   <tr>
      <th class="patternMainCol">
         Local file
      </th>
      <td class="patternMainCol">
         <input type="hidden" name="filename" value="Sample.txt" /><input type="file" name="filepath" value="Sample.txt" size="30" /> 
      </td>
      <td class="patternHelpCol patternMainCol">
Upload up to 10000 KB.
      </td>
   </tr>
   <tr>
      <th>
         Comment
      </th>
      <td>
         <input class="comment" type="text" name="filecomment" value="Just a sample" maxlength="256" size="50" /> 
      </td>
      <td class="patternHelpCol"></td>
   </tr>
   <tr>
      <th>
         Link
      </th>
      <td>
         <input type="checkbox" class="twikiCheckbox" id="createlink" name="createlink"  /><label for="createlink">Create a link to the attached file</label>
      </td>
      <td class="patternHelpCol">
Images will be displayed, for other attachments a link will be created.
      </td>
   </tr>
   <tr>
      <th>
         Hide file
      </th>
      <td>
         <input type="checkbox" class="twikiCheckbox" id="hidefile" name="hidefile"  /><label for="hidefile">Do not show attachment in table</label>
      </td>
      <td class="patternHelpCol">Attachments will not be shown in topic view page.</td>
   </tr>
   <tr>
   <th> </th>
   <td colspan="2">
      <input type="submit" class="twikiSubmit" name="changeproperties" value='Change properties only' />
   </td>
</tr>
</table>
</div>
</td></tr>
</table>
</form>
</blockquote>
@


1.14
log
@buildrelease
@
text
@d1 1
a1 1
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="14"}%
d14 1
a14 1
	* 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 [[#AttachmentAccess][need-to-know basis]] using web and topic-level access control; create a central reference library that's easy to share with an user group spread around the world.
d18 1
a18 1
	* 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!
d22 2
a23 2
	* Through your Web browser, you can easily upload graphics (or sound files, or anything else you want to link to on a page) and place them on a single page, or use them across a web, or site-wide.
		* __NOTE:__ You can also add graphics - any files - directly, typically by FTP upload. This requires FTP access, and may be more convenient if you have a large number of files to load. FTP-ed files can't be managed using browser-based Attachment controls. You can use your browser to create TWikiVariables shortcuts, like this %<nop>H% = %H%.
d27 11
a37 11
	* Click on the ==Attach== link at the bottom of the page. The =Attach= screen lets you browse for a file, add a comment, and upload it. The uploaded file will show up in the [[#FileAttachmentTable][File Attachment table]].
		* __NOTE:__ The topic must already exist. It is a two step process if you want to attach a file to a non-existing topic; first create the topic, then add the file attachment.
		* Any type of file can be uploaded. Some files that might pose a security risk are renamed, ex: =*.php= files are renamed to =*.php.txt= so that no one can place code that would be read in a .php file. 
		* 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 =%<nop>ATTACHFILESIZELIMIT%= variable of the TWikiPreferences, currently set at %ATTACHFILESIZELIMIT% KB.
			* %X% 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.
	
d40 1
a40 1
	* Click on the file in the [[#FileAttachmentTable][File Attachment table]].
d43 1
a43 1
	* %X% _NOTE:_ There is no access control on individual attachments. If you need control over single files, create a separate topic per file and set topic-level [[TWikiDocumentation#TWikiAccessControl][access restrictions]] for each.
d48 3
a50 3
	* Click ==Manage== on the Attachment to be moved.
	* On the control screen, select the new web and/or topic.
	* Click ==Move==. The attachment and its version history are moved. The original location is stored as [[TWikiDocumentation#Meta_Data_Definition][topic Meta Data]].
d58 19
a76 19
	* Once a file is attached it can be referenced in the topic. Example:
		1. ==Attach== file: =Sample.txt=
		1. ==Edit== topic and enter: =%<nop>ATTACHURL%/Sample.txt=
		1. ==Preview==: =%<nop>ATTACHURL%/Sample.txt= text appears as: %PUBURLPATH%/%WEB%/%TOPIC%/Sample.txt, a link to the text file.

	* To reference an attachment located in another topic, enter:
		* =%<nop>PUBURLPATH%/%<nop>WEB%/OtherTopic/Sample.txt= (if it's within the same web)
		* =%<nop>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:
		1. ==Attach== file: =Sample.txt=
		1. ==Edit== topic and write text: =%<nop>INCLUDE{"%<nop>ATTACHURL%/Sample.txt"}%=
			* Content of attached file is shown inlined.
			* Read more about INCLUDE in [[TWikiVariables#VarINCLUDE][TWiki<nop>Variables]]

	* GIF, JPG and PNG images can be attached and shown embedded in a topic. Example:
		1. ==Attach== file: =Smile.gif=
		1. ==Edit== topic and write text: =%<nop>ATTACHURL%/Smile.gif=
		1. ==Preview==: text appears as %PUBURLPATH%/%WEB%/%TOPIC%/Smile.gif, an image.
d86 2
a87 2
<tr><td class="twikiFirstCol">%ICON{"txt"}%</td><td><a href="%SCRIPTURLPATH{viewfile}%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH{attach}%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>  Just a sample  </td></tr>
<tr><td class="twikiFirstCol">%ICON{"bmp"}%</td><td><a href="%SCRIPTURLPATH{"viewfile"}%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH{attach}%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>  Smiley face  </td></tr>
d101 1
a101 1
<tr><td>  1	</td><td>  <a href="%SCRIPTURLPATH{"viewfile"}%/%WEB%/%TOPIC%?rev=1&amp;filename=Sample.txt">view</a>  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="UploadingUser">UploadingUser</a>  </td><td>	 Just a sample	 </td></tr>
d109 1
a109 1
	<code>Sample.txt</code> <span class="twikiGrayText">(<a href="http://visiblearea.com/devtwiki/bin/view/Main/TWikiContributor" class="twikiLink">TWikiContributor</a>)</span>
d113 8
a120 8
	<tr>
		<th class="patternMainCol">
			Local file
		</th>
		<td class="patternMainCol">
			<input type="hidden" name="filename" value="Sample.txt" /><input type="file" name="filepath" value="Sample.txt" size="30" /> 
		</td>
		<td class="patternHelpCol patternMainCol">
d122 19
a140 19
		</td>
	</tr>
	<tr>
		<th>
			Comment
		</th>
		<td>
			<input class="comment" type="text" name="filecomment" value="Just a sample" maxlength="256" size="50" /> 
		</td>
		<td class="patternHelpCol"></td>
	</tr>
	<tr>
		<th>
			Link
		</th>
		<td>
			<input type="checkbox" class="twikiCheckbox" id="createlink" name="createlink"  /><label for="createlink">Create a link to the attached file</label>
		</td>
		<td class="patternHelpCol">
d142 16
a157 16
		</td>
	</tr>
	<tr>
		<th>
			Hide file
		</th>
		<td>
			<input type="checkbox" class="twikiCheckbox" id="hidefile" name="hidefile"  /><label for="hidefile">Do not show attachment in table</label>
		</td>
		<td class="patternHelpCol">Attachments will not be shown in topic view page.</td>
	</tr>
	<tr>
	<th> </th>
	<td colspan="2">
		<input type="submit" class="twikiSubmit" name="changeproperties" value='Change properties only' />
	</td>
d166 1
a166 1
	* 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.
d168 3
a170 3
	* 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==.
d174 3
a176 3
	* 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.
	
@


1.13
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="1084053156" format="1.0" version="1.13"}%
d10 1
a10 1
File Attachments can be used to create powerful customized groupware solutions, like file sharing and document management systems, and quick Web page authoring.
d33 5
a37 1

d61 1
a61 1
		1. ==Preview==: =%<nop>ATTACHURL%/Sample.txt= text appears as: %PUBURL%/%WEB%/%TOPIC%/Sample.txt, a link to the text file.
d64 2
a65 2
		* =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/Sample.txt= (if it's within the same web)
		* =%<nop>PUBURL%/Otherweb/OtherTopic/Sample.txt= (if it's in a different web)
d71 1
a71 1
			* Read more in IncludeTopicsAndWebPages.
d76 1
a76 1
		1. ==Preview==: text appears as %PUBURL%/%WEB%/%TOPIC%/Smile.gif, an image.
d83 1
a83 2
<blockquote style="background-color:#f0f0f0">
<table border="1" cellspacing="0" cellpadding="20" width="90%"><tr><td>
d85 3
a87 3
<tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a></strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
a88 1
</td></tr></table>
d93 1
a93 1
Clicking on a ==Manage== link takes you to a new page that looks like this:
a97 5
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a></strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttribute">Attribute</a></strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a> </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
</table>

d99 1
a99 1

d101 1
a101 1
<tr><td>  1.1	</td><td>  <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.1&amp;filename=Sample.txt">view</a>  </td><td>  2001.08.30.09.28.56  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  &nbsp;  </td></tr>
d103 1
d105 5
a109 6
<table width="100%">
	  <tr>
  <td align="right">
	Previous <br /> upload:
  </td><td>
	<code>C:\DATA\Sample.txt</code> (<a href="PeterThoeny">PeterThoeny</a>)
d111 51
a161 30
 </tr>
 <tr>
  <td align="right">
	Local file:
  </td><td>
	<input type="hidden" name="filename" value="Sample.txt" />
	<input type="file" name="filepath" value="C:\DATA\Sample.txt" size="50" />
  </td>
 </tr>
 <tr>
  <td align="right">
	Comment:
  </td><td>
	<input type="text" name="filecomment" value="Just a sample" maxlength="50" size="50" />
  </td>
 </tr>
 <tr>
  <td align="right">
	Link:
  </td><td>
	<input type="checkbox" name="createlink"  /> Create a link to the attached file at the end of the topic.
  </td>
 </tr>
 <tr>
  <td align="right">
	Hide file:
  </td><td>
	<input type="checkbox" name="hidefile"  /> Hide attachment in normal topic view.
  </td>
 </tr>
a162 7
_Help text ..._

	Topic <b>FileAttachment</b> . {	 <input type="submit" value=" &nbsp; Upload file &nbsp; " />  | 
	<input type="submit" name="changeproperties" value="Change properties" />	| 
	<a href="%SCRIPTURLPATH%/rename%SCRIPTSUFFIX%/%WEB%/%TOPIC%?attachment=Sample.txt">Move attachment</a>  | 
	<a href="FileAttachment">Cancel</a> }
</td></tr></table>
d175 3
d179 1
a179 1
%STOPINCLUDE%
d181 2
a182 2
%META:FILEATTACHMENT{name="Sample.txt" attr="" comment="Just a sample" date="964294620" path="C:\DATA\Sample.txt" size="30" user="thoeny" version=""}%
%META:FILEATTACHMENT{name="Smile.gif" attr="" comment="Smiley face" date="964294680" path="C:\DATA\Smile.gif" size="94" user="thoeny" version=""}%
@


1.12
log
@none
@
text
@d1 166
a166 164
%META:TOPICINFO{author="PeterThoeny" date="1073892847" format="1.0" version="1.12"}%
%TOC%
%STARTINCLUDE%
---# File Attachments

_Each topic can have one or more files of any type attached to it by using the Attach screen to upload (or download) files from your local PC. Attachments are stored under revision control: uploads are automatically backed up; all previous versions of a modified file can be retrieved._ 

---++ 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.

---+++ 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 [[#AttachmentAccess][need-to-know basis]] using web and topic-level access control; create a central reference library that's easy to share with an user group spread around the world.

---+++ File Sharing

	* 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!

---+++ Web Authoring

	* Through your Web browser, you can easily upload graphics (or sound files, or anything else you want to link to on a page) and place them on a single page, or use them across a web, or site-wide.
		* __NOTE:__ You can also add graphics - any files - directly, typically by FTP upload. This requires FTP access, and may be more convenient if you have a large number of files to load. FTP-ed files can't be managed using browser-based Attachment controls. You can use your browser to create TWikiVariables shortcuts, like this %<nop>H% = %H%.

---++ Uploading Files

	* Click on the ==Attach== link at the bottom of the page. The =Attach= screen lets you browse for a file, add a comment, and upload it. The uploaded file will show up in the [[#FileAttachmentTable][File Attachment table]].
		* Any type of file can be uploaded. Some files that might pose a security risk are renamed, ex: =*.php= files are renamed to =*.php.txt= so that no one can place code that would be read in a .php file. 
		* 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 =%<nop>ATTACHFILESIZELIMIT%= variable of the TWikiPreferences, currently set at %ATTACHFILESIZELIMIT% KB.
			* %X% 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.

---++ Downloading Files

	* Click on the file in the [[#FileAttachmentTable][File Attachment table]].
#AttachmentAccess

	* %X% _NOTE:_ There is no access control on individual attachments. If you need control over single files, create a separate topic per file and set topic-level [[TWikiDocumentation#TWikiAccessControl][access restrictions]] for each.

---++ Moving Attachment Files

An attachment can be moved between topics. 
	* Click ==Manage== on the Attachment to be moved.
	* On the control screen, select the new web and/or topic.
	* Click ==Move==. The attachment and its version history are moved. The original location is stored as [[TWikiDocumentation#Meta_Data_Definition][topic Meta Data]].

---++ Deleting Attachments

Move unwanted Attachments to web =Trash=, topic =TrashAttachment=.

---++ Linking to Attached Files

	* Once a file is attached it can be referenced in the topic. Example:
		1. ==Attach== file: =Sample.txt=
		1. ==Edit== topic and enter: =%<nop>ATTACHURL%/Sample.txt=
		1. ==Preview==: =%<nop>ATTACHURL%/Sample.txt= text appears as: %PUBURL%/%WEB%/%TOPIC%/Sample.txt, a link to the text file.

	* To reference an attachment located in another topic, enter:
		* =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/Sample.txt= (if it's within the same web)
		* =%<nop>PUBURL%/Otherweb/OtherTopic/Sample.txt= (if it's in a different web)

	* Attached HTML files and text files can be inlined in a topic. Example:
		1. ==Attach== file: =Sample.txt=
		1. ==Edit== topic and write text: =%<nop>INCLUDE{"%<nop>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:
		1. ==Attach== file: =Smile.gif=
		1. ==Edit== topic and write text: =%<nop>ATTACHURL%/Smile.gif=
		1. ==Preview==: text appears as %PUBURL%/%WEB%/%TOPIC%/Smile.gif, an image.

#FileAttachmentTable
---++ 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*.

<blockquote style="background-color:#f0f0f0">
<table border="1" cellspacing="0" cellpadding="20" width="90%"><tr><td>
<table border="1" cellspacing="0" cellpadding="1"> 
<tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a></strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
</table>
</td></tr></table>
</blockquote>

---++ File Attachment Controls

Clicking on a ==Manage== link takes you to a new page that looks like this:

<blockquote style="background-color:#f0f0f0">
<form>
<table border="1" cellspacing="0" cellpadding="20"><tr><td>
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a></strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttribute">Attribute</a></strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">manage</a> </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">manage</a>	  </td><td align="right">  0.1 K  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
</table>

<nop><h2>Update attachment <code>Sample.txt</code></h2>

<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong>Version</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment</strong> </th></tr>
<tr><td>  1.1	</td><td>  <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.1&amp;filename=Sample.txt">view</a>  </td><td>  2001.08.30.09.28.56  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  &nbsp;  </td></tr>
</table>
<p />
<table width="100%">
	  <tr>
  <td align="right">
	Previous <br /> upload:
  </td><td>
	<code>C:\DATA\Sample.txt</code> (<a href="PeterThoeny">PeterThoeny</a>)
  </td>
 </tr>
 <tr>
  <td align="right">
	Local file:
  </td><td>
	<input type="hidden" name="filename" value="Sample.txt" />
	<input type="file" name="filepath" value="C:\DATA\Sample.txt" size="50" />
  </td>
 </tr>
 <tr>
  <td align="right">
	Comment:
  </td><td>
	<input type="text" name="filecomment" value="Just a sample" maxlength="50" size="50" />
  </td>
 </tr>
 <tr>
  <td align="right">
	Link:
  </td><td>
	<input type="checkbox" name="createlink"  /> Create a link to the attached file at the end of the topic.
  </td>
 </tr>
 <tr>
  <td align="right">
	Hide file:
  </td><td>
	<input type="checkbox" name="hidefile"  /> Hide attachment in normal topic view.
  </td>
 </tr>
</table>
_Help text ..._

	Topic <b>FileAttachment</b> . {	 <input type="submit" value=" &nbsp; Upload file &nbsp; " />  | 
	<input type="submit" name="changeproperties" value="Change properties" />	| 
	<a href="%SCRIPTURLPATH%/rename%SCRIPTSUFFIX%/%WEB%/%TOPIC%?attachment=Sample.txt">Move attachment</a>  | 
	<a href="FileAttachment">Cancel</a> }
</td></tr></table>
</form>
</blockquote>

	* 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==.

---++ 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.

%STOPINCLUDE%
@


1.11
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="1072411080" format="1.0" version="1.11"}%
d43 1
a43 1
	* Click ==Action== on the Attachment to be moved.
d49 1
a49 2
It is not possible to delete attached files directly. You can delete a topic, and its attachments with it. 
	* %T% One easy workaround is to create a ==Trash.TrashAttachments== - then, simply move unwanted Attachments to that topic.
d81 3
a83 3
<tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a>:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment:</strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a>	  </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
d90 1
a90 1
Clicking on an ==Action== link takes you to a new page that looks like this:
d95 3
a97 3
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a>:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttribute">Attribute</a>:</strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a> </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
d102 1
a102 1
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong>Version:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment:</strong> </th></tr>
@


1.10
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1020526327" format="1.0" version="1.10"}%
d30 2
a31 2
		* Currently there is no file size limit other than the disk space on the server. 
			 * %X% 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 FTP for large file uploads.
d165 1
a165 1
%STOPINCLUDE%
@


1.9
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="1007461198" format="1.0" version="1.9"}%
d4 1
a4 1
---## File Attachments
d6 1
a6 2
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, so uploads can never be lost, and files changes can be made with a rollback option that lets you retrieve all previous versions. 
d8 1
a8 1
---+++ What Are Attachments Good For?
d10 1
a10 1
File Attachments can be used to create powerful groupware solutions - file sharing, document management - and for speedy Web authoring.
d12 1
a12 1
---++++ Document Management System
d14 1
a14 1
	* 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 [[#AttachmentAccess][need-to-know basis]] using; create a central reference library that's easy to access and manage by an entire user group.
d16 1
a16 1
---++++ File Sharing
d20 1
a20 1
---++++ Web Authoring
d22 2
a23 2
	* 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.
d25 1
a25 1
---+++ Uploading Files
d27 2
a28 3
	* 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 [[#FileAttachmentTable][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 =*.php.txt=.
		* Currently there is no file size limit besides the disk space on the server.
d30 2
d33 1
a33 1
---+++ Downloading Files
d35 1
a35 1
	* To download: Click on the file in the [[#FileAttachmentTable][File Attachment table]].
d38 1
a38 1
	* __NOTE:__ There is no access control on individual attachments. If you need this type of control, create separate topics and define [[TWikiDocumentation#TWikiAccessControl][access restrictions]] per topic.
d40 1
a40 1
---+++ Moving Attachment Files
d42 4
a45 1
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 [[TWikiDocumentation#Meta_Data_Definition][topic Meta Data]].
d47 1
a47 1
---+++ Deleting Attachments
d49 2
a50 1
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.
d52 1
a52 1
---+++ Linking to Attached Files
d55 7
a61 7
		1. *Attach* file: =Sample.txt=
		1. *Edit* topic and write text: =%<nop>ATTACHURL%/Sample.txt=
		1. *Preview* - =%<nop>ATTACHURL= text appears as: %PUBURL%/%WEB%/%TOPIC%/Sample.txt, a link.

	* To reference an attachment located in another topic, write text:
		* =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/Sample.txt= (for the same web)
		* =%<nop>PUBURL%/Otherweb/OtherTopic/Sample.txt= (for adifferent web)
d64 2
a65 2
		1. *Attach* file: =Sample.txt=
		1. *Edit* topic and write text: =%<nop>INCLUDE{"%<nop>ATTACHURL%/Sample.txt"}%=
d70 3
a72 3
		1. *Attach* file: =Smile.gif=
		1. *Edit* topic and write text: =%<nop>ATTACHURL%/Smile.gif=
		1. *Preview* - text appears as %PUBURL%/%WEB%/%TOPIC%/Smile.gif, an image.
d75 1
a75 1
---+++ File Attachment Contents Table
d83 2
a84 2
<tr><td>  <img src="%PUBURL%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURL%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURL%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a>	  </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURL%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURL%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURL%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
d89 1
a89 1
---+++ File Attachment Controls
d91 1
a91 1
Clicking on an *Action* link takes you to a new page that looks like this:
d97 2
a98 2
<tr><td>  <img src="%PUBURL%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURL%/viewfile%SCRIPTSUFFIX%/TWiki/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURL%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a> </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURL%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURL%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURL%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
d104 1
a104 1
<tr><td>  1.1	</td><td>  <a href="%SCRIPTURL%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.1&amp;filename=Sample.txt">view</a>  </td><td>  2001.08.30.09.28.56  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  &nbsp;  </td></tr>
d159 1
a159 1
		* *To hide/unhide* an attachment, enable the *Hide file* checkbox, then click *Change properties*.
d161 1
a161 1
---+++ Known Issues
d163 3
a165 1
	* 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.
@


1.8
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1007374320" format="1.0" version="1.8"}%
d79 2
a80 2
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a>	  </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
d93 2
a94 2
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/%WEB%/%TOPIC%?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt&amp;revInfo=1">action</a> </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
d100 1
a100 1
<tr><td>  1.1	</td><td>  <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.1&amp;filename=Sample.txt">view</a>  </td><td>  2001.08.30.09.28.56  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  &nbsp;  </td></tr>
@


1.7
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="MikeMannix" date="1000459267" format="1.0" version="1.7"}%
a28 1

a29 1

a30 1

d56 2
a57 2
			* =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/Sample.txt= (for the same web)
			* =%<nop>PUBURL%/Otherweb/OtherTopic/Sample.txt= (for adifferent web)
a153 1

a154 1

@


1.6
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="999848672" format="1.0" version="1.6"}%
d7 1
a7 1
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. 
d88 1
a88 1
---+++ File Attachment Control Page
d164 1
a164 1
	* 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.
@


1.5
log
@none
@
text
@d1 1
a1 1
%META:TOPICINFO{author="PeterThoeny" date="999828345" format="1.0" version="1.5"}%
d6 2
a7 2
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.
d11 2
d15 1
a15 1
	* __document management system: distribution, revision__
d19 1
a19 1
	* __share files: applications, data files; recommended for light use__
d21 1
a21 1
---++++ Page Content
d23 2
a24 1
	* __on-site use: linking to graphics, docs__
d28 7
a34 4
	* 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 [[#FileAttachmentTable][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.
d39 3
a41 1
	* 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.
d45 1
a45 1
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 [[TWikiDocumentation#Meta_Data_Definition][topic meta data]].
d54 7
a60 6
		* Attach file: =Sample.txt=
		* Edit topic and write text: =%<nop>ATTACHURL%/Sample.txt=
		* Text is shown as: %PUBURL%/%WEB%/%TOPIC%/Sample.txt, ex: it is a link.
		* To reference an attachment located in another topic write text:
			* =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/Sample.txt= (for same web)
			* =%<nop>PUBURL%/Otherweb/OtherTopic/Sample.txt= (for different web)
d63 4
a66 4
		* Attach file: =Sample.txt=
		* Edit topic and write text: =%<nop>INCLUDE{"%<nop>ATTACHURL%/Sample.txt"}%=
		* Content of attached file is shown inlined.
		* Read more in IncludeTopicsAndWebPages.
d69 3
a71 3
		* Attach file: =Smile.gif=
		* Edit topic and write text: =%<nop>ATTACHURL%/Smile.gif=
		* Text is shown as: %PUBURL%/%WEB%/%TOPIC%/Smile.gif , it shows up as an image.
d76 1
a76 1
Is a table that looks like this:
d78 6
a83 4
<table border="1" cellspacing="0" cellpadding="20"><tr><td>
<table border="1" cellspacing="0" cellpadding="1"> <tr><th align="center" bgcolor="#99CCCC"> <strong><a href="FileAttachment">Attachment</a>:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Action:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Size:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Date:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Who:</strong> </th><th align="center" bgcolor="#99CCCC"> <strong>Comment:</strong> </th></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/FileAttachment?rev=&amp;filename=Sample.txt">Sample.txt</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/TWiki/FileAttachment?filename=Sample.txt&amp;revInfo=1">action</a>	  </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/FileAttachment?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/TWiki/FileAttachment?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td></tr>
d86 1
d90 1
a90 1
Clicking on an action link takes you to a new page that looks like this:
d92 1
d96 2
a97 2
<tr><td>  <img src="%PUBURLPATH%/icn/txt.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/FileAttachment?rev=&amp;filename=Sample.txt">Sample.txt</a> </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/TWiki/FileAttachment?filename=Sample.txt&amp;revInfo=1">action</a> </td><td>  30  </td><td>  22 Jul 2000 - 19:37  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Just a sample  </td><td align="center">	&nbsp;	</td></tr>
<tr><td>  <img src="%PUBURLPATH%/icn/bmp.gif" width="16" height="16" align="top" /> <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/FileAttachment?rev=&amp;filename=Smile.gif">Smile.gif</a>	  </td><td>  <a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/TWiki/FileAttachment?filename=Smile.gif&amp;revInfo=1">action</a>	  </td><td>  94  </td><td>  22 Jul 2000 - 19:38  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  Smiley face  </td><td align="center">	&nbsp;	</td></tr>
d103 1
a103 1
<tr><td>  1.1	</td><td>  <a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/TWiki/FileAttachment?rev=1.1&amp;filename=Sample.txt">view</a>  </td><td>  2001.08.30.09.28.56  </td><td>  <a href="PeterThoeny">PeterThoeny</a>  </td><td>  &nbsp;  </td></tr>
d148 1
a148 1
	<a href="%SCRIPTURLPATH%/rename%SCRIPTSUFFIX%/TWiki/FileAttachment?attachment=Sample.txt">Move attachment</a>  | 
d152 1
d154 1
a154 1
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.
d156 1
a156 1
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.
d158 1
a158 1
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.  
d160 1
a160 1
Similarly to hide/unhide an attachment click in the _Hide file_ checkbox are press _Change properties_.
@


1.4
log
@none
@
text
@d1 4
a4 2
%META:TOPICINFO{author="MikeMannix" date="999162452" format="1.0" version="1.4"}%
---++ Dev Reorg Note:
d6 25
a30 1
The latest version of <nop>FileAttachments includes attachments under revision control. It's in the 01 Sep 2001 TWiki release.
d32 2
a33 1
	* Current Dev topic: Codev.AttachmentsUnderRevisionControl 
d35 1
a35 1
-----
d37 26
a62 3
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.
	* 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 <nop>FileAttachment table.
	* To download: Click on the file in the <nop>FileAttachment table.
d64 2
a65 1
*FileAttachment table*
d69 45
a113 18
<table cellpadding=0 border=0 cellspacing=4>
<tr bgcolor="#99CCCC">
  <th>FileAttachment:
  </th><th> Action:
  </th><th> Size:
  </th><th> Date:
  </th><th> Who:
  </th><th> Comment:
  </th>
</tr>
<tr>
  <td> (attached file)
  </td><td> 
	(view, update, add)
  </td><td> (file size)
  </td><td> (upload date)
  </td><td> (uploaded by)
  </td><td> (file comment)
d115 15
a129 1
</tr>
d131 12
d144 1
a144 4
*Action* is:
	* *view:* View file. This is the same as clicking on the filename.
	* *update:* Update file that is already attached.
	* *add:* Add a new attachment.
d146 5
a150 9
*Remarks*
	* Once a file is attached it can be referenced in the topic by =%<nop>ATTACHURL%/{filename}= . Example:
		* Attach file: =Sample.txt=
		* Text is shown as: %PUBURL%/%WEB%/%TOPIC%/Sample.txt , i.e. it is a link.
	* GIF and JPG images can be attached and shown in the text like this:
		* Attach file: =Smile.gif=
		* Edit topic and write text: =%<nop>ATTACHURL%/Smile.gif=
		* Text is shown as: %PUBURL%/%WEB%/%TOPIC%/Smile.gif , i.e. it shows up as an image.
	* It is not possible to delete attached files with the current TWiki implementation. Contact %WIKIWEBMASTER% if you need to delete files.
@


1.3
log
@none
@
text
@d1 8
a8 1
*FileAttachment*
d54 2
a55 61
<!--TWikiAttachment--><p>
<table cellpadding="0" border="0" cellspacing="4">
<tr bgcolor="#99CCCC">
  <th>
%TWIKIWEB%.FileAttachment:
  </th><th>
Action:
  </th><th>
Size:
  </th><th>
Date:
  </th><th>
Who:
  </th><th>
Comment:
  </th>
</tr><TwkNextItem>
<tr>
  <td valign="top">
<TwkFileIcon><IMG src="%PUBURLPATH%/icn/txt.gif" width="16" hight="16" align="top"></TwkFileIcon>&nbsp;<a href="%PUBURLPATH%/%WEB%/%TOPIC%/Sample.txt"><TwkFileName>Sample.txt</TwkFileName></a>
<TwkFilePath> <TwkData value="C:\DATA\Sample.txt"> </TwkFilePath>
  </td><td valign="top">
<TwkAction><a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt">view</a>&nbsp;<a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Sample.txt">update</a></TwkAction>
  </td><td valign="top" align="right">
<TwkFileSize>30</TwkFileSize>
  </td><td valign="top">
<TwkFileDate>22&nbsp;Jul&nbsp;2000&nbsp;-&nbsp;19:37</TwkFileDate>
  </td><td valign="top">
<TwkFileUser> Main.PeterThoeny</TwkFileUser>
  </td><td valign="top">
<TwkFileComment>Just a sample</TwkFileComment>
  </td>
</tr><TwkNextItem>
<tr>
  <td valign="top">
<TwkFileIcon><IMG src="%PUBURLPATH%/icn/bmp.gif" width="16" hight="16" align="top"></TwkFileIcon>&nbsp;<a href="%PUBURLPATH%/%WEB%/%TOPIC%/Smile.gif"><TwkFileName>Smile.gif</TwkFileName></a>
<TwkFilePath> <TwkData value="C:\DATA\Smile.gif"> </TwkFilePath>
  </td><td valign="top">
<TwkAction><a href="%SCRIPTURLPATH%/viewfile%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif">view</a>&nbsp;<a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%?filename=Smile.gif">update</a></TwkAction>
  </td><td valign="top" align="right">
<TwkFileSize>94</TwkFileSize>
  </td><td valign="top">
<TwkFileDate>22&nbsp;Jul&nbsp;2000&nbsp;-&nbsp;19:38</TwkFileDate>
  </td><td valign="top">
<TwkFileUser> Main.PeterThoeny</TwkFileUser>
  </td><td valign="top">
<TwkFileComment>Smiley face</TwkFileComment>
  </td>
</tr><TwkNextItem>
<tr>
  <td valign="top">
  </td><td valign="top">
<TwkAction><a href="%SCRIPTURLPATH%/attach%SCRIPTSUFFIX%/%WEB%/%TOPIC%">add</a><TwkAction>
  </td><td valign="top" align="right">
  </td><td valign="top">
  </td><td valign="top">
  </td><td valign="top">
  </td>
</tr>
</table>
<!--TWikiAttachment-->@


1.2
log
@none
@
text
@d27 1
a27 1
  </td><td> (uploded by)
@


1.1
log
@none
@
text
@d5 1
a5 1
	* To download: Click on the file in <nop>FileAttachment table.
d41 1
a41 2
		* Edit topic and write text: =%<nop>ATTACHURL%/Sample.txt=
		* Text is shown as: %ATTACHURL%/Sample.txt , i.e. it is a link.
d45 1
a45 1
		* Text is shown as: %ATTACHURL%/Smile.gif , i.e. it shows up as an image.
d51 1
a51 1
Main.FileAttachment:
d66 2
a67 2
<TwkFileIcon><IMG src="%PUBURL%/icn/txt.gif" width="16" hight="16" align="top"></TwkFileIcon>&nbsp;<a href="%PUBURL%/%WEB%/%TOPIC%/Sample.txt"><TwkFileName>Sample.txt</TwkFileName></a>
<TwkFilePath> <TwkData value="C:\Temp\Sample.txt"> </TwkFilePath>
d69 1
a69 1
<TwkAction><a href="../../viewfile/Main/FileAttachment?filename=Sample.txt">view</a>&nbsp;<a href="../../attach/Main/FileAttachment?filename=Sample.txt">update</a></TwkAction>
d73 1
a73 1
<TwkFileDate>26&nbsp;Mar&nbsp;1999&nbsp;-&nbsp;04:05</TwkFileDate>
d82 2
a83 2
<TwkFileIcon><IMG src="%PUBURL%/icn/bmp.gif" width="16" hight="16" align="top"></TwkFileIcon>&nbsp;<a href="%PUBURL%/%WEB%/%TOPIC%/Smile.gif"><TwkFileName>Smile.gif</TwkFileName></a>
<TwkFilePath> <TwkData value="C:\Temp\Smile.gif"> </TwkFilePath>
d85 1
a85 1
<TwkAction><a href="../../viewfile/Main/FileAttachment?filename=Smile.gif">view</a>&nbsp;<a href="../../attach/Main/FileAttachment?filename=Smile.gif">update</a></TwkAction>
d89 1
a89 1
<TwkFileDate>26&nbsp;Mar&nbsp;1999&nbsp;-&nbsp;04:05</TwkFileDate>
d99 1
a99 1
<TwkAction><a href="../../attach/Main/FileAttachment">add</a><TwkAction>
d106 2
a107 1
</table><!--TWikiAttachment-->@
