Switch that specifies whether it is possible to upload not only separate files, but also entire folders.

Syntax

Initialize
JavaScript CopyCode imageCopy Code
<script type="text/javascript" src="iuembed.js"></script>
<script type="text/javascript">
var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500);
//...other params...
iu.addParam("AllowFolderUpload", "false");
//...other params...
iu.writeHtml();
</script>
Get/Set Value in Runtime
JavaScript CopyCode imageCopy Code
getImageUploader("ImageUploaderID").setAllowFolderUpload(value);
value = getImageUploader("ImageUploaderID").getAllowFolderUpload();
Property Value

A boolean value (true or false). If true, the user can add folders to upload list. Otherwise only files can be added.

NoteNote

If this property is false and Add Folders button in OnePane mode is used, Image Uploader will add all files from this folder instead of the folder itself.

Default value is "false".

Remarks

All Image Uploader limitations (like FileMask, etc) are applied. If the folder contains too many files and it will take too long to apply verification, special dialog is displayed so that the user could abort folder adding process.

When the uploaded folders contain subfolders, you probably would like to restore the folder structure on the server. To do it, you can parse the FileName_N . It contains not just the file name, but the relative path (relatively the folder which is being uploaded, including the name of this folder).

NoteNote

A difference between the ActiveX version and the Java version is the following. In the ActiveX version, a message box notifying that the folder is processed appears in several seconds after the processing starts. In Java version, this message box appears at once.

See Also

Examples
Open File Dialog Sample

Reference
AddFolderDialogButtonCancelText Property
AddFolderDialogButtonSkipAllText Property
AddFolderDialogButtonSkipText Property
AddFolderDialogTitleText Property
AddFolders Method
ShowSubfolders Property