cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Schwarz" <saschw...@hotmail.com>
Subject Re: Fw: Uploading files with Cocoon 2.1 (one more)
Date Fri, 28 Nov 2003 14:03:59 GMT
Joesp,
Hmmm. I haven't checked the archives to see what I posted. But it is 
possible I cut and pasted with some error....I'm very sorry if that is the 
case! I didn't just attach the action since it wouldn't persist in the mail 
archives that way.

In my code I have:
		// Create the upload folder(s) if need be
		File folder = new File(uploadFolder);
		if (!folder.exists()) {
			folder.mkdirs();
		}

	File destFile =
		new File(folder + File.separator + filename);
// code that does the copy

So the creation of the directories is independent from the file copying..

>File folder = new File (uploadfolder);
>if (!folder.exists()){
>
>folder.mkdirs();
>//code for uploading and saving a file
>
>}
>
>That generates the next problem: if you upload a file, a folder is created,
>and the file is saved into this folder.

So if you make the change as you indicate I'm sure all is well. (?)
Steve

_________________________________________________________________
Set yourself up for fun at home!  Get tips on home entertainment equipment, 
video game reviews, and more here.   
http://special.msn.com/home/homeent.armx


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


Mime
View raw message