ActiveXPowUpload 1.2.0.5
Functional notices
  Home page
Contact support

Folders in the file list

Starting from version 1.0.1 ActiveXPowUpload can contain folders in the file list. The FileCount property as before returns a number of files in the list. To know a total number of items in the file list use the FileListItemCount property, it count both files and folders. To traverse all items in the list start from 0 and count til the FileListItemCount-1. The FileItem object contains a IsFile property that allows to distinguish between files and folders. For example, consider this sample of jscript code. We assume there is an ActiveXPowUpload object named ActiveXPowUpload defined somewhere.

<TEXTAREA NAME="ListContent" ROWS=10 COLS=100>
</TEXTAREA>
<script language="jscript">
    for(var i=0; i<ActiveXPowUpload.FileListItemCount; i++)
    {
        if(ActiveXPowUpload.GetItem(i).IsFile)
            ListContent.value += "file: " + ActiveXPowUpload.GetItem(i).FullName + "\n";
        else
            ListContent.value += "folder: " + ActiveXPowUpload.GetItem(i).FullName + "\n";
    }
</script>

What folders are added to the file list

Only empty folders are added to the file list. A folder is considered to be empty if it does not contain anything, neither files nor folders. If a folder contains something, but none of the items of this folder was added to the list because of MaxFileSize, AllowExtensions and so on, it anyway is not considered to be empty, and it will not be added to the file list.

For example, there is a directory structure:

dir\dir1\file1.txt

dir\dir1\file2.txt

dir\dir2\dir1

dir\dir3\file1.exe

dir\dir4

We added the top most folder "dir" in the file list. Suppose, we have a filter that prevents adding files with an "exe" extension. There are no other restrictions. Then following files and folders will be added to the file list: "dir\dir1\file1.txt", "dir\dir1\file2.txt", "dir\dir2\dir1", "dir\dir4".

URLs

ActiveXPowUpload has a number of properties dealing with URLs. Unless stated otherwise, URLs provided by a user must adhere to the following rules.

Note: see ActiveXPowUpload without browser object notice for the known problems with relative URLs.