现在的位置: 首页 > 综合 > 正文

Work with a file upload and download controls

2012年11月28日 ⁄ 综合 ⁄ 共 1066字 ⁄ 字号 评论关闭
Table of Contents

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

抱歉!评论已关闭.