addFile

adds files to the uploader using browser fileApi

void addFile(string|object name, [number size,string type] );
namestring|objectfile name and (optionally) its extension or a file object
sizenumberfile size
typestringfile extension

Example

$$("uploader_1").addFile("my_picture", 214, "jpg");

Details

If you pass file name with extension, like "my_picture.jpg", uploader will automatically define its extension and store it as file type.

If you specify only the file title, like "my_picture", type becomes an obligatory parameter.

It is also possible to pass an object with file properties into the method, as in:

$$("uploader_1").addFile({name:"my_picture", size:100, file:File});

where File is an instance of the File object.

Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.