Hi Dave,

I don't copy the file at all.  The FileUploadInterceptor gets called before
I can do anything with the file.

Session A. Mwamufiya
Carnegie Mellon University
MBA | Tepper School of Business
MSE (software eng.) | School of Computer Science
T: (412) 508-5455 | [EMAIL PROTECTED]

-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 14, 2007 7:21 PM
To: Struts Users Mailing List
Subject: Re: file upload exception

--- Session A Mwamufiya wrote:
> I check whether the uploaded file exists (also it's
> name and size) in my getters and setters.

Is it the *correct* size?

Have you looked at the FileUploadInterceptor code to
see how it behaves or looked at the log file to see
what information it might provide? The following is
from 2.0.8, and provides a hint as to why I was asking
about the file being copied etc.

// invoke action
String result = invocation.invoke();

// cleanup
fileParameterNames =
multiWrapper.getFileParameterNames();
while (fileParameterNames != null &&
fileParameterNames.hasMoreElements()) {
    String inputValue = (String)
fileParameterNames.nextElement();
    File[] file = multiWrapper.getFiles(inputValue);
    for (int index = 0; index < file.length; index++)
{
        File currentFile = file[index];
       
log.info(getTextMessage("struts.messages.removing.file",

                                new Object[]
{inputValue, currentFile}, 
                               
ActionContext.getContext().getLocale()));
        if ((currentFile != null) &&
currentFile.isFile()) {
            currentFile.delete();
        }
    }
}

d.


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




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

Reply via email to