cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Schwarz" <saschw...@hotmail.com>
Subject Re: file upload - another question
Date Sat, 15 Nov 2003 16:58:14 GMT
Hi Jan
You're going to have to modify Geoff's upload action. Take a look at the 
action I posted, it will recursively generate all the directories on the 
path. You can copy/paste into Geoff's code.

I don't know what var he uses to get the upload dir name...but do something 
like this:
// Create the upload folder(s) if need be
File folder = new File(uploadFolder);
if (!folder.exists()) {
   folder.mkdirs();
}

HTH
Steve

>
>Hello,
>
>the file upload action I found on this list (contributed by Geoff)
>works actually fine, but there is one thing that I would like to do:
>I would like to create the upload directory dynamically.. At the
>moment, a file is uploaded correctly to a directory only if this
>directory already exists. Is it possible to create the upload
>directory at run-time, e.g. a directory whose name depends on
>parameter given (e.g. the logged-in user-id)?
>
>Regards
>
>Jan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>

_________________________________________________________________
>From Beethoven to the Rolling Stones, your favorite music is always playing 
on MSN Radio Plus. No ads, no talk. Trial month FREE!  
http://join.msn.com/?page=offers/premiumradio


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message