cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: FileUploadManager
Date Mon, 16 Feb 2004 19:54:16 GMT
Geoff Howard wrote:

> Sylvain Wallez wrote:
>> Geoff Howard wrote:
>>> Sylvain Wallez wrote:
>>>> Mark Lundquist wrote:
>>>>> I've uploaded a corrected version of Nicolas Maisonneuve's  
>>>>> FileUploadManager component, to:
>>>>> upload.jar
>>>>> ...and updated that Wiki page yet again, so I think it now gives 
>>>>> the  Full Monty as far as uploading with Flow.  I also cleaned up 
>>>>> some of  the other upload pages.
>>>>> Thanks to Geoff Howard and Bert van Kets for helping to get this  
>>>>> working.
>>>>> This has turned into quite a recipe here on the Wiki page, and 
>>>>> the  "example" upload manager class seems good enough for general 
>>>>> use.  Is  there any reason why this component and its 
>>>>> configuration should not be  added to Cocoon?
>>>> Sorry, but this what this upload manager does is only copy a file. 
>>>> What's the need of having yet another component for this?
>>> I'm -0 on this particular component as is, but am not quite sure 
>>> which other components usable from flow with uploaded files are 
>>> available as alternatives.  Which are you referring to?
>> Do we need a component at all? We have the CopySourceAction that does 
>> an equivalent job (if you copy an "upload:" to another source), and 
>> we could wrap it into a JS utility library.
> Well, I am working on the philosophy that use of actions should be 
> increasingly discouraged in favor of flow.  Since calling actions from 
> flow is unnatural at best, I'd rather refactor the copy source action 
> to  use some common helper class/component which could also be useful 
> from flow.  (BTW, totally agreed that the general purpose idea in this 
> case is copying one source to another - very powerful)

I agree with you, and that's what I actually meant. The important point 
is that we don't add yet another component for such a simple need.

> Since there is already a well known example in the wiki depicting file 
> uploads with a mythical UploadManager component, I have felt that it 
> would make sense to introduce such a thing in reality so we don't get 
> so many repeated questions about how to handle file uploads in Cocoon.
> In fact, in general I would like to see many of the useful actions 
> refactored into general use components for simple use from flow. 
> Currently there is not as much that feels simple for newbies to do 
> from within flow script so they are using actions, transformers, and 
> even xsp with side effects (!) to do what they need.

This reminds me... IIRC, there used to be in the preliminary 
incarnations of flowscript a means to call actions from flow. And we 
decided that this feature should not be part of the core, as we want to 
encourage people to move away from actions, but that it could be 
implemented in a legacy.js file, which was never written. Maybe it's 
time to write it?

>> Also, the Woody upload widget has currently no binding, and we could 
>> write one that copies the uploaded file somewhere to another source.
> Sounds good, but I need to look into the upload widget before commenting.
> What people are saying is that the very basic need of uploading a file 
> into a directory is not brain-dead simple and probably should be.

Ok, I hear that. So let's write a "source-utils.js" that gathers some 
utilities needed when dealing with sources in flowscript (read/write 
DOM, copy a source including uploads, others?).


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message