You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2004/02/13 02:10:05 UTC
FileUploadManager
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?
If so, I'll open a Bugzilla entry to track it. I'd be glad to
contribute the patch, but it might take me a while to get to it. It
would be my first Cocoon patch and there will be some learning curve,
so it'll have to wait until such time as I can absorb the time-suck :-)
~ml
Re: FileUploadManager
Posted by Sylvain Wallez <sy...@apache.org>.
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:
>>>>>
>>>>> 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)
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
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: FileUploadManager
Posted by Geoff Howard <co...@leverageweb.com>.
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
Re: FileUploadManager
Posted by Sylvain Wallez <sy...@apache.org>.
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.
Also, the Woody upload widget has currently no binding, and we could
write one that copies the uploaded file somewhere to another source.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: FileUploadManager
Posted by Geoff Howard <co...@leverageweb.com>.
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?
Geoff
Re: FileUploadManager
Posted by Sylvain Wallez <sy...@apache.org>.
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 -1 to add it to Cocoon.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com