--- 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]

Reply via email to