Hi all ...
Geoff... thanks for your help all these days, and for your interest about my
problems for uploading files in Cocoon 2.1.
Steven ... thanks for posting your upload action. It's very important to
colaborate in this way, sharing the knowledges we have.
About your upload action, I think it contains an error, that causes you
can't upload a file if there have been uploaded another file before....
Here's the code of your upload action:
....
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. If you want to upload a second
file,the folder is already created, and !folder.exists() is false , and no
code is executed in order to upload and save the file.
I have used next if condition:
if (true) {
...
}
In this way, the code inside the "if condition" is always executed, and
files are saved without problem. If you mantain if(!folder.exists()), the
code is only executed first time .. because second time the folder already
exists.
Am I wrong???
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]