you don't need to store it in the temporary upload directory first.
You can get an inputstream on the filepartarray in the action.

Enumeration enum = request.getParameterNames();

  while (enum.hasMoreElements()) {
    String parameterName = (String)enum.nextElement();
    Object imageParamValue = request.get(parameterName);

//is it an attached file
if (imageParamValue instanceof FilePart) {
FilePartArray fpa = (FilePartArray)request.get(parameterName);


    ByteArrayInputStream bais =
                        (ByteArrayInputStream)fpa.getInputStream();
    .........

depub2 wrote:
I am trying to use the upload feature in Cocoon. I
understand the default upload mechanism which uploads to a
temporary directory and requires the file to be copied or
moved before the request ends. I can get a file to upload to
the temporary directory.

THE QUESTION IS: How do I move/copy the file without
dropping into some custom java code or xsp? Isn't there a
cocoon action like "copy-file"? Do I really have to drop all
the way down to custom java/xsp to do something simple like
move a file?

Thanks so much!!

David


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to