Name

multiplefileupload — A swf8-specific class for uploading multiple files to a server

Synopsis

LZX: multiplefileupload
JavaScript: lz.multiplefileupload
Type: Class
Access: public
Topic: Incubator.Components
Declared in: lps/components/incubator/uploader/multiplefileupload.lzx

Description

A class for uploading a single file using the Flash 8 file upload api. This only works with the swf8 runtime, that is, with lzr=swf8.

Using this class requires a service to which to upload. A sample upload jsp is provided, which uses the cos.jar library from servlets.com. To use the example, copy cos.jar from servlets.com into $TOMCAT_HOME/common/lib and rename lps/components/incubator/uploader/example/upload.jsp.txt to upload.jsp. Restart tomcat, so it will see the new jar, then visit http://localhost:8080/legals/lps/components/incubator/uploader/example/test-multiplefileupload.lzx?lzr=swf8

(The terms of the servlets.com license forbid it from being redistributed with Open Laszlo.)

To upload a single file, see fileupload.

Superclass Chain

node (LzNode) » view (LzView) » multiplefileupload

Known Subclasses

Details

Properties (2)

erroroccured
<attribute name="erroroccured" type="boolean" value="false" />
public var erroroccured : boolean;
Error occured
numfields
<attribute name="numfields" value="1" />
public var numfields;
numbers of fileuploadlist

Methods (5)

addField()
<method name="addField" />
public function addField();
add one file upload field
checkError()
<method name="checkError" />
public function checkError();
check if there were any errors in these file upload fields
clearAllFields()
<method name="clearAllFields" />
public function clearAllFields();
clear all selected file fields
removeField()
<method name="removeField" />
public function removeField();
remove one file upload field, and sort selected files to top
setNumFields()
<method name="setNumFields" args="num" />
public function setNumFields(num);
Set number of field upload fields and sort selected files to top

LZX Synopsis

<class name="lz.multiplefileupload" extends=" LzView ">
  <attribute name=" erroroccured " type="boolean" value="false" />
  <attribute name=" numfields " value="1" />
  <method name=" addField " />
  <method name=" checkError " />
  <method name=" clearAllFields " />
  <method name=" removeField " />
  <method name=" setNumFields " args="num" />
</class>

JavaScript Synopsis

public lz.multiplefileupload extends  LzView  {
  public var erroroccured  : boolean;
  public var numfields ;
  prototype public function addField ();
  prototype public function checkError ();
  prototype public function clearAllFields ();
  prototype public function removeField ();
  prototype public function setNumFields (num);
}