2
votes

Need in your support with the following issue.

Input:

  1. I'm developing XPages application (on Domino 9) which has to allow video-files preview, so byte-range seving has to be available.
  2. According to the guide Improving file-download performance for Web clients - byte-range seving is supported by Domino Server for uncompressed attachments.
  3. Video-files uploaded via xp:fileUpload control from XPage.
  4. LZ1 compression is disabled on NSF DB (in Properties -> Advanced tab).
  5. Also “Compress on upload” disabled in Web Site document.

I faced with the issue:

when uploading files (any, *.wmv, *.mp4, .pdf) - they became LZ1-compressed in the documents by default. "Compression: LZ1" - showed via scanEZ. As result - these files not byte-range served.

How to disable that compression on upload?

P.S. In case of upload files via Notes client, on file upload dialog defaultly checked "Compress" checkbox available. If uncheck it - file uploaded and saved not compressed in the document, and available for byte-range serving.

Thanks in advance!

2
Has LZ1 compression been disabled all the time? Just a thought that the change might require compact -c to become effective.Panu Haaramo
Yes, it is new application, made from scratch to find solution on disabling that compression...AndrewG10i
What is the setting of your Richttext item? Is "Store content as HTML and MIME" enabled?Sven Hasselbach
Just tried both variants - no effect. But actually it was expected, as XPages can work completely without forms...AndrewG10i
I was able to reproduce your issue and it was possible to fix it with the option for the rich text item. And yes, with some extra code, you can do the same things you can do with a form (f.e. adding Reader/Autor fields).Sven Hasselbach

2 Answers

2
votes

after long time IBM provided another “automated” way for that workaround.

This is still workaround, as file attachments attached to document as MIMEentity. The workaround is to place the following parameter in xsp.properties:

xsp.richtext.attachments.format.mime=true
0
votes

So, guys, I got the solution for my issue!! )) All thanks to Sven, he showed me the workaround listed below.

After portion of testing, I see only the two following prerequisites for getting attachments not compressed in documents after uploading them from XPage:

1) When declaring DataSource on XPage, the following code has to be included:

postNewDocument="#{javascript:fileDS.getDocument().convertToMIME()}"

2) xp:fileUpload control has to target to “Body” field (and only “Body” field)!


So, code on XPage should look like something below:

<xp:this.data>
    <xp:dominoDocument
        var="fileDS"
        formName="fileContainer"
        postNewDocument="#{javascript:fileDS.getDocument().convertToMIME()}">    
    </xp:dominoDocument>
</xp:this.data>
<xp:fileUpload id="fileUpload1" value="#{fileDS.Body}"></xp:fileUpload>

By fulfilling these prerequisites, files uploaded decompressed to documents, as result accessing them by the link like:

http://hostname/dbname/docUNID/$FILE/fileName.ext

Domino serve them with byte ranges (Accept-Ranges: bytes – showed in Response Headers)

Once more - thanks to Sven! I’m you borrower! ))