docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 6.1Web Developer ManualProgramming Tags
Copyright  2018, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com



<cache>
<?cdata ?>
<cgi>
<clear-session>
<combine-path>
<crypt>
<debug>
<dice>
<eval>
<force-session-id>
<fsize>
<gauge>
<guess-content-type>
<hash-hmac>
<maketag>
<nocache>
<nooutput>
<noparse>
<?noparse ?>
<page-size>
<?perl ?>
<?pike ?>
<serve-static-resources>
<servlet>
<session>
<set-max-cache>
<trace>
<writefile>
<xml-rpc-call>

<writefile></writefile>

Provided by module: Tags: Writefile

Writes uploaded or direct content to a file. You can either use an upload form or write the container content directly into a file. The ownership of any newly created file is determined by the directory it is placed into.

Additional functionality includes removal or renaming of already existing files. This container tag will set the truth value depending on success or failure of the requested operation.

This tag does not work on CMS filesystems. Insted we recommend using [can't locate XREF ../sitebuilder-internal/sb-edit-area.tag]


Attributes

filename="string"

Specifies the virtual filename to be created or operated on (relative to the current directory, or to the root of the virtual filesystem).


chroot="string"

Specifies the virtual root directory (sandbox) all file operations are contained under.


from="string"

Specifies the type=file form field variable which uploaded the file to be written. If this attribute is omitted, the container content is what will be written instead. Given the example below, the parameter from=wrapupafile should be specified.

<form method='post' enctype='multipart/form-data'> <input type='file' name='wrapupafile' /> <input type='submit' value='Upload file' /> </form> File uploaded: <insert scope='form' variable='wrapupafile.filename'/>

append

Append to the file instead of replacing it.


mkdirhier

Create the directory hierarchy needed to store the file if needed.


remove

Causes the specified filename or directory to be removed.


moveto="string"

Causes the specified filename to be moved to this new location.


max-size="integer"

Specifies the maximum upload file size in bytes which is accepted.


charset="string"

Specifies a character set to encode the file content with before writing it. This is only useful for text data, like when the source is a form variable which can contain characters from the full Unicode charset. A useful charset is "utf-8" which can encode all Unicode characters.


encode-with-entities

Causes all characters that aren't encodable with the charset specified by the "charset" attribute to be written as numerical XML entity references (e.g. "&#x20ac;"). If no "charset" attribute is given then all characters wider than 8 bits are written as entity references.


max-height="integer"

The maximum imageheight in pixels which is accepted.


max-width="integer"

The maximum imagewidth in pixels which is accepted.


min-height="integer"

The minimum imageheight in pixels which is accepted.


min-width="integer"

The minimum imagewidth in pixels which is accepted.


accept-type="string"

Comma separated list of file types which are accepted, currently supported types are jpeg, png and gif; the check is performed on the file content, not on the file extension.