System Class
Username:  
Password:
  > Home
> User Guide
v Reference
    > Introduction
    > CROFT
    v BEE Variables
       v BEE Variable Name
          o General/Object Class
          o Special Class
          o System Class
       o BEE Variable Value
       > BEE Conversions
    > BEE Syntax
    > BEE Commands
    > Database Operation
    > Content Management
    > Objects and Classes
    > Interface with others
    o Glossary
> Portal Object
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Reference >> BEE Variables >> BEE Variable Name >> System Class <=  =>      <  1  2  3  4  5  6  7  8  9  10  11  12  >  
upload System Class

n        upload contains information about file or files uploaded via the client browser.

Variable

Value/meaning

Access

upload%[index&]name:name
upload%[index&]name:type
upload%[index&]name:size
upload%[index&]name:uploaded

The name of the uploaded file
The type of the uploaded file
The size of the uploaded file
non-zero if the file has been uploaded

get

upload%[index&]name:saveas

The name of the file to be saved on the server side.  Uploaded files are held only temporarily until the end of the page run.  To "actualise" the uploaded file, the "saveas" element must be set to a valid server file name (which is in FileDir – {sys%croft:filedir}, or {sys%croft:wwwdir} or {sys%croft:textdir} provided the full path is specified).

get
set

 

Note: index& is used only for array input (e.g. <input type=file name="clientfile[]">).  The first file is represented as "upload%0&clientfile" and the second "upload%1&clientfile" and so on.

A typical upload form is like:

<form method=post enctype="multipart/form-data" action="save.htm">

<input type=file name="clientfile">

<input type=submit value=Upload>

</form>

 

In the above example, "save.htm" will do var upload%clientfile:saveas = "serverfile"; to save the uploaded file into "serverfile" on the server storage.  The status of the "saveas" operation is in variables status%upload and message%upload.

 

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd