cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: FileUploadManager
Date Sun, 15 Feb 2004 23:34:59 GMT
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:
>>>>     
>>>> http://wiki.cocoondev.org/attach?page=FileUploadsWithFlow%2Fcocoon- 
>>>> 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)

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.

> 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.

Geoff


Mime
View raw message