This XPages custom control is a multi-file upload control that uses a central attachment repository db for all the attachments. The application has very little code and utilizes the Repeat control and Panel control to generate an unlimited amount of uploads per XPage. A developer can drag and drop this custom control on an XPage then configure the control with the repository database name…and they now can offer the users an unlimited amount of file attachments per document.



The end user clicks "Add New Upload" and a new document is created in the repository database. The XPage is then refreshed and the user is presented with a description field and an upload control to populate.



An article on the techniques used in building the control can be found here: http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7



This control takes 6 parameters that allow the developer to specify the location and name of the repository database as well as control the various features of the file download control.



The control is located in the sample application database "XPagesMultiAttachCC.nsf" and is named "MultiAttachments". The repository sample is named "FileUploadDB.nsf" and can be placed in any directory on the server as long as the parameter "fileUploadDbName" includes the directory.



Descriptions of the available parameters


Parameter Description Type
fileUploadDbName The db name that will store the attachments.  Include the full path from the Notes data directory. string
hideIfNoAttachments Controls the visibility of the download control if there are no attachments boolean
showCreatedDate Controls the visibility of the column for Creation date boolean
showModifiedDate Controls the visibility of the column for Modified date boolean
showSize Controls the visibility of the column for Attachment size boolean
showType Controls the visibility of the column for Attachment tyope boolean