cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: FileUploadManager
Date Tue, 10 Oct 2006 21:19:30 GMT
On 06.10.2006 19:34, Steven D. Majewski wrote:

> I started with trying the upload: pseudo protocol, and I'm combining 
> that with using flowscript, because I need to add a bunch of
> conditional processing todecide whether to accept the upload file
> ( and where to put it. )

I'm also using flowscript. And I present the result of the pipeline to 
the user as well before it gets finally stored in database, so it is a 
quite similar use case. I only do not publish documents. The data of the 
uploaded file gets put into a form.

function displayimport(form, requestData) {
     var objectType = requestData.getObjectType();
     form.showForm("internal-display-import-" + objectType);

     if (form.submitId == 'cancel') {
         // back to list view
         cocoon.sendPage('display-list-' + objectType);
     } else {
         // transform uploaded file into DOM
         var pipelineUtil = 
         var doc = pipelineUtil.processToDOM("internal-import-" + 
objectType, null);

         // prepare the request to display the DOM data
         var requestData = getRequestData();


(Sorry, my JavaScript code is not object-oriented, what makes it a bit 
ugly. The code is three years old, so forgive me please ;) )

displayRequestData() finally shows a form containing the data of the 
file. The actual uploaded file is no longer needed and I don't care for it.

The pipeline snippet I posted in my last mail was the one matching on 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message