Work with a file upload and download controls
Table of Contents
Set in Application Properties -> XPage Properties -> File Upload max size .
The option "replace file name" does not work in 8.5. Fix is planned for 8.5.1.
The submit/save button needs to do a full refresh, not a partial refresh.
If your application is in a subdirectory on your domino server the download control does not work, it presents wrong paths to the files. This is a known bug and is planned to fix in 8.5.1.
John Mackey found the following workaround:
- go to all properties of the download control
- set all properties -> data -> var to "rowData"
- navigate to fileNameHrefValue property and add the following javascript:
Important: replace "<dollar>" with the dollar char!!!
Replace "datasource" with your actual datasource in your XPage.
Details and screenshots: http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/XPages-File-Download-Control
- 1 Restrict the size of uploaded files
- 2 Known Bugs for upload control
- 3 Workaround for known bug in download control
Restrict the size of uploaded files
Set in Application Properties -> XPage Properties -> File Upload max size .
Known Bugs for upload control
The option "replace file name" does not work in 8.5. Fix is planned for 8.5.1.
The submit/save button needs to do a full refresh, not a partial refresh.
Workaround for known bug in download control
If your application is in a subdirectory on your domino server the download control does not work, it presents wrong paths to the files. This is a known bug and is planned to fix in 8.5.1.
John Mackey found the following workaround:
- go to all properties of the download control
- set all properties -> data -> var to "rowData"
- navigate to fileNameHrefValue property and add the following javascript:
if (!@IsNewDoc()) {
return "0/"+datasource.getDocument().getUniversalID()+"/<dollar>FILE/"+rowData.getName();
} else {
return "#";
}
Important: replace "<dollar>" with the dollar char!!!
Replace "datasource" with your actual datasource in your XPage.
Details and screenshots: http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/XPages-File-Download-Control