All Articles

XPages File download control

I have encountered an issue with the file download control and reported it to IBM.

When accessing a document from another database and using the file download control (<xp:fileDownload>) I encounter 500 error if I try to download the file.

The URL generated by the control for the files are:

http://server/database.nsf/xsp/.ibmmodres/domino/OpenAttachment/other-database.nsf/document-unid/field/filename.ext

While I wait for IBM to respond with a solution, I am using the code below.

<xp:panel> 
    <xp:this.rendered><![CDATA[#{javascript:var att = document1.getAttachmentList('field');return att != null && att.size() > 0;}]]></xp:this.rendered> 
    <strong>Attachments</strong> 
    <ul> 
        <xp:repeat 
            value="#{javascript:return document1.getAttachmentList('field');}" 
            var="ent"> 
            <li> 
                <xp:text escape="false"> 
                    <xp:this.value><![CDATA[#{javascript:return '<a href="/database.nsf/' + document1.getDocument().getUniversalID() + '/$FILE/' + ent.getName() + '">' + ent.getName() + '</a>';}]]></xp:this.value> 
                </xp:text> 
            </li> 
        </xp:repeat> 
    </ul> 
</xp:panel>

update (19/08/2009): 4 weeks later and still waiting for a response from IBM.