Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://wiki.cs.msu.ru/System/FileAttachment?sortcol=0;table=1;up=0
Дата изменения: Unknown Дата индексирования: Mon Apr 11 11:06:55 2016 Кодировка: koi8-r |
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.
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.
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 cannot be managed using browser-based attachment controls. You can use your browser to create shortcuts using Macros, like this %H% = .
Attachment names are stored directly in the server native file system, so filenames are sanitized to prevent use of names that would be unacceptable to the variety of platforms where Foswiki is supported. Note that the rules are different depending on whether or not your installation is configured to support international characters (UseLocale)
.
(period / decimal point / "dot")
_
(Underscore)
-
(Hyphen or dash)
_
) during upload
.
, \
or /
) will be stripped
_
_
(Underscore).
*
(Asterisk)
?
(Question mark)
~
(Tilde)
^
(Caret / Circumflex)
\
(Backslash)
$
(Dollar-sign)
@
(At-sign)
%
(Percent-sign)
`'"
Quotes (Open-quote, Close-quote/Apostrophe, and Double-quote)
&
(Ampersand)
;
(Semicolon)
|
(Vertical line)
<>
(Less and Greater signs)
[]
(Open and close square brackets)
.
, \
or /
) will be stripped
[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 file attachment table. The topic must already exist. If it does not, it is a two step process: First create the topic, then add the file attachment.
*.php
files are renamed to *.php.txt
so that no one can place code that would be read in a .php file.
%ATTACHFILESIZELIMIT%
preference settings, currently set at 10000 kB. It is 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.
[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. The automatic attachment feature can only be used by an administrator who has access to the server's file system.
%ATTACHEDFILELINKFORMAT%
preference setting. Images (files ending in gif, jpg, jpeg or png) are handled by %ATTACHEDIMAGEFORMAT%
.
$filename
: the name of the file
$fileurl
: URL encoded version of the filename
$comment
: the file comment from the upload dialog
$size
: the filesize (%ATTACHEDIMAGEFORMAT%
only)
$name
: (deprecated, should no longer be used)
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 access restrictions for each.
[Manage]
on the Attachment to be moved.
[Move]
. The attachment and its version history are moved. The original location is stored as topic meta data.
Trash
, topic TrashAttachment
.
[Attach]
a file, for example: Sample.txt
[Edit]
the topic you attached the file to and enter: %ATTACHURL%/Sample.txt
[Preview]
: the %ATTACHURL%/Sample.txt
text appears as: http://wiki.cs.msu.ru/pub/System/FileAttachment/Sample.txt, a link to the text file.
%PUBURL%/%WEB%/OtherTopic/Sample.txt
(if it's within the same web)
%PUBURL%/Otherweb/OtherTopic/Sample.txt
(if it's in a different web)
[Attach]
file: Sample.txt
[Edit]
topic and write text: %INCLUDE{"%ATTACHURL%/Sample.txt"}%
[Attach]
an image file, for example: Smile.gif
[Edit]
topic and write text: %ATTACHURL%/Smile.gif
[Preview]
: text appears as , an image.
viewfile
script, which requires a change in your web server configuration. To see how to configure Apache to do this, see http://foswiki.org/Support/ApacheConfigGenerator#Attachments
h
means the attachment is hidden and not listed when viewing a topic in normal mode.
The file attachment table is normally displayed at the bottom of the page, or optionally, hidden and accessed when you click [Attach]
.
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
txt | Sample.txt | manage | 0.1 K | 22 Jul 2000 - 19:37 | ProjectContributor | Just a sample |
gif | Smile.gif | manage | 0.1 K | 22 Jul 2000 - 19:38 | ProjectContributor | Smiley face |
[Manage]
link takes you to a new page that looks a bit like this (depending on what skin is selected).
Here, you have different options: [Update file]
. The filename of the original attachment will preserved; the filename of the local file you chose will not be used.
[Change comment and properties only]
. Note that the comment listed against the specific version will not change, however the comment displayed when viewing the topic does change.
Do not show attachment in table
checkbox, then click [Change comment and properties only]
.
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
gif | Smile.gif | manage | 0.1 K | 22 Jul 2000 - 19:38 | ProjectContributor | Smiley face |
txt | Sample.txt | manage | 0.1 K | 22 Jul 2000 - 19:37 | ProjectContributor | Just a sample |