--- meeboo <[EMAIL PROTECTED]> wrote:
> private File uploadedMovie = null;
> public void setUploadedMovie(File uploadedMovie)
> {this.uploadedMovie =
> uploadedMovie;}
> 
> The problem is that I can't set the name of the
> uploaded file before it is
> saved to the drive. I can specify the path but the
> file name is some random
> generated key by Tomcat. Can I somehow intercept the
> upload before it has
> been saved to the  drive and change the name? If
> not, are there other
> alternatives?

Yes; use the information in the documentation! :)

http://struts.apache.org/2.x/docs/file-upload-interceptor.html

There are two additional properties set by the upload
interceptor:

String fileName;
String contentType;

To answer your next question, you should copy the
uploaded file to its ultimate destination (renaming it
to a different place may also work but I haven't tried
that) and there may be other ways as well.

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to