0
votes

I have a strange behaviour when I try to upload a file with more than 186 characters length of filename.

I get the following error on NotesXSPDocument.save():

enter image description here


And the following error when saving using a simple action:

enter image description here


Source Code:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:this.data>
        <xp:dominoDocument var="document1" computeWithForm="onsave" formName="Files"></xp:dominoDocument>
    </xp:this.data>

    <xp:fileUpload id="fileUpload" value="#{document1.Body}">
        <xp:eventHandler event="onchange" submit="true" refreshMode="complete" disableValidators="true">
            <xp:this.action><![CDATA[#{javascript:// kick off round-trip...}]]></xp:this.action>
        </xp:eventHandler>
    </xp:fileUpload>

    <xp:fileDownload rows="30" id="fileDownload1" displayLastModified="false" value="#{document1.Body}"></xp:fileDownload>

    <xp:button value="Save Document SimpleAction" id="btnSaveDocumentSimpleAction">
        <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
            <xp:this.action>
                <xp:saveDocument var="document1"></xp:saveDocument>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>

    <xp:button value="Save Document NotesXSPDocument" id="btnSaveDocumentNotesXSPDocument">
        <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:document1.save();}]]></xp:this.action>
        </xp:eventHandler>
    </xp:button>

</xp:view>

Hint: I am working on a Domino Sever 8.5.3 FP6

Thanks in advance for any answer.


UPDATE:

On the domino server I can find (copy, rename, etc.) the uploaded file, so I can't understand the following error message:

Error while saving document Could not save the document NEW_c0 NotesException: File C:\TEMP\SYSTEM\notesC78121\xsppers\143\E9DMAJ1VVQ\DominoDoc-231-Body\BCXXXXXXXxXXXXXXXXXXXXXXXXXXXXXXXXXCCCCCCCCCCCCXXXXXXXXXXCxxXXXXXXXXAXXXXXXXXXXBCCCCCCCCCCCCCCCCCCCCXXCCCCCCCXCCXCCCCCCCCCXXXXXXXXXXXCDDABCCCCCCCXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDX.jpg not found

2

2 Answers

4
votes

You are hitting the Windows file path length limit of 256 characters: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath

If you need to upload files with such long file names, you should run your Domino server on Linux.

0
votes

On Windows individual components of a filename (directories along the path, and the final filename) are limited to 255 characters. I have exceeded this limit.

The length of the following filepath is 256 characters:

C:\TEMP\SYSTEM\notesC78121\xsppers\143\E9DMAJ1VVQ\DominoDoc-231-Body\BCXXXXXXXxXXXXXXXXXXXXXXXXXXXXXXXXXCCCCCCCCCCCCXXXXXXXXXXCxxXXXXXXXXAXXXXXXXXXXBCCCCCCCCCCCCCCCCCCCCXXCCCCCCCXCCXCCCCCCCCCXXXXXXXXXXXCDDABCCCCCCCXCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDX.jpg