Work with a file upload and download controls

Source: Internet
Author: User
Tags xpage
Table of contents

    • 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.