This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Aug 30, 2013, 2:44 PM
6 Posts
topic has been resolvedResolved

fileUpload | support byte-range serving | LZ1-compression disabling

  • Category: Other
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags: byte-range serving,compression,LZ1,Accept-Ranges: bytes
  • Replies: 8

Hi!

According to this manual Improving file-download performance for Web clients get the issue that files >20 Mb anyway became LZ1-compressed during fileUpload via XPage, meantime sizes up to ~20 Mb - uploaded not compressed to document.

Any idea where to control it?

In Web Site Document -> Domino Web Engine -> File compression on upload is Disabled.

Thanks in advance!

Aug 30, 2013, 2:55 PM
586 Posts
hmm

Are you sure that relates at all to XPages and is not meant more for classic domino web dev?  I didn't see xpages mentioned on that page.

 

 

Aug 31, 2013, 11:46 AM
6 Posts
replay

Thank you for response!

...hmm, I'm developing XPages application and try to use that functionality there. Hope, somebody faced with similar behavior of file Upload (generally, with compression issue and bytes-serving), and could help me with idea, how to solve it!

Let me repeat the issue again:

- files with sizes up to ~20 Mb are uploaded and stored not compressed (Compression: NONE – displayed via ezSuite) in the documents, and thus available as bytes-range served via web.
- files with sizes more than ~20 Mb – became compressed in the documents (Compression: LZ1), and not bytes-ranges served.
LZ1 compression is disabled on NSF DB. Also “Compress on upload” disabled in Web Site document...
Any ideas, what wrong? 

Thanks!

Sep 3, 2013, 2:48 PM
586 Posts
hmm

I don't know any more about this.  MAYBE there's some info in the fileSendr project on OpenNTF since that deal with large uploads...

 

 

Sep 4, 2013, 8:42 PM
6 Posts
UPDATE: issue with media-files

After big portion of testing I found out that issue with uploading media-files like *.wmv or *.mp4. These files became LZ1-compressed in documents (as showed via scanEZ).

(BTW: uploaded PDF files - also became LZ1-compressed.)

Now searching how to disable that compression for media-files.

Would anybody have link to HOWTO - I appreciate it!

Thanks!

Sep 9, 2013, 7:21 AM
14 Posts
I didn't find any api in LS or java to do it but...

Andrey,

I also faced this problem, but fortunately for me the media files were not updated from the UI (internal rules do not allow to upload such big files from ui web interface) but from the filesystem. So the only way I found is to use C API call in a lotusscript agent.

This agent will look at $File fields, extract them on the filesystem and reattach it using C Api call from lotusscript. Not nice and probably not what you're looking for but didn't find any other way to do it... :-((

 

In the declaration of the lotusscript agent (on a windows plateform) :

Const LIB_W32 = "nnotes" ' Windows/32

Declare Function W32_NSFNoteAttachFile Lib LIB_W32 Alias "NSFNoteAttachFile" (ByVal h As Long, ByVal item_name As LMBCS String, ByVal item_name_length As Integer, ByVal file_name As LMBCS String, ByVal orig_path_name As LMBCS String, ByVal encoding_type As Integer) As Integer

 

Declare Function W32_NSFNoteUpdate Lib LIB_W32 Alias "NSFNoteUpdate" (ByVal note_handle As Long, ByVal update_flags As Integer) As Integer

 

Private Const COMPRESS_NONE = 0%

 Dim hNT As Long 

 

In the agent, loop through all the items of the document and if the field is called $File field, extract the field on the filesystem, remove the $File item and reattach the file using this (doc=the notes document ,  importFullPath=the full path to the file extracted on disk(like c:\temp\myfile.avi) and filename the name of the file (myfile.avi)) :

   hNT = doc.Handle
      
   'Upload the file without compression
   Call W32_NSFNoteAttachFile (hNT, "$File", Len("$File"), importFullPath, filename, COMPRESS_NONE)

   'save the document
   Call W32_NSFNoteUpdate(hNT, 0)

  ' remove the temporary document on disk
  Kill importFullPath  

 

Hope this helps anyway....

Renaud

 

 

 

 

Sep 9, 2013, 7:21 AM
14 Posts
Duplicate entry please ignore... :-((

 

 

 

Sep 9, 2013, 1:10 PM
6 Posts
Thanks for advice!

Renaud,

thank you for posting your advice!

I will take it into account, and in case don't find appropriate solution - will consider your solution as workaround!

 

Currently I'm still searching for solution, how to disable compression during files upload via xp:fileUpload control from XPage.

I will let know here about final implementation...


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal