Hi Jack,
I finally got it to work. html:file doesn't get filled with a default value
(thats a security concern), so I have passed the filename from display.jsp
(preview) to my action and in my action class I am checking if the file
exists, then I am renaming to another name for Submission and for Edit, I am
checking if the file exists then I am deleting that file.

And the file is uploaded only once. But there is still a concern with this,
What if the user uploads the image and goes to preview page and just closes
the browser without submit or edit?

There will be an unused image in the server. Can we do anything for this?
one idea I have is to call another Action class "onUnLoad" using javascript
and delete that file. May be there is a better way than this.

Thanks
Uma

-----Original Message-----
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 10:52 AM
To: uma.k
Cc: Struts Users Mailing List
Subject: Re: html:file value


Hi, Uma,

Let's start over.  Forget about anything but telling me from a user's
point of view what you want to do.  You have a user using a browser
and wanting to do something with files.  If the file is on the server,
then we are talking about a download.  If the file is on the client
(user machine), then we are talking about an upload.  Tell me what the
user wants to do with the files.  From what you have said I might
guess right, but I cannot know for sure.

Jack

--
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-----------------------------------------------

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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