Search code examples
pluginsuploadplonetypeconverterdocumentviewer

Plone document-viewer wildcard.foldercontents


I've installed document-viewer and wildcard.foldercontents on my Plone instance: now I can upload multiple files at a time and have a nice pdf, excel, word files preview.

There is only a problem. When I try to upload multiple files at a time, browsing the Plone site is impossible (infinite loading) from another tab or from other workstations: this because of the document-viewer plugin, I suppose (multiple file elaboration?).

When I upload only one file (regardless of the size), browsing the site is possible and without slowdown.

How can I customise wildcard.foldercontents so that it elaborates only one file at a time from the queue?


Solution

  • I'm the author of both those products... So you can blame me for any frustrations you have...

    Which version of wildcard.foldercontents? In 2.x, it should only upload one at a time. I think in 1.x, it would possibly do 2 at once.

    By default, collective.documentviewer does the conversions synchronously. Conversions, depending on the size of the PDF, can take quite a long time.

    Now if you're only running one zeo client, which defaults to 2 threads, and upload 2 files simultaneously potentially, then attempt to browse the site after, yes, it will be very slow.

    Solutions

    • turn off automatic conversions of PDFs. There should be an option in Site Setup. You will have to later manually convert the document to documentviewer though.

    • or integrate plone.app.async which will do the PDF conversions on a worker zeo client so you won't get bogged down after uploading a bunch