You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinod Kumar <vk...@yahoo.com> on 2007/01/26 20:02:39 UTC

check if a file is OPEN status before uploading

Hi,
 I am uploading a file using struts (using FormFile)
but before uploading, I want to make sure that file is
not in open state. If so, I want to display message to
the user to close the file and then try to upload. I
am able to upload the file. Just wondering , how can i
check if the file is opened by the user or not. Thanks
for you help in advance.

thx
vinod


 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: check if a file is OPEN status before uploading

Posted by AQ...@epsilon.com.
Dave Newton <ne...@yahoo.com> wrote on 01/26/2007 03:03:19 PM:

> --- Vinod Kumar <vk...@yahoo.com> wrote:
> > [...] before uploading, I want to make sure that
> file
> > is not in open state. 
> 
> I know of no way you can do this, although there may
> be some Javascript treachery. Your code is not being
> executed on the client; it does not have access to
> file system statii.
> 

Even Javascript cannot read files on your hard-disk. Use an applet perhaps 
(if you are too paranoid)?


Re: check if a file is OPEN status before uploading

Posted by Dave Newton <ne...@yahoo.com>.
--- Vinod Kumar <vk...@yahoo.com> wrote:
> [...] before uploading, I want to make sure that
file
> is not in open state. 

I know of no way you can do this, although there may
be some Javascript treachery. Your code is not being
executed on the client; it does not have access to
file system statii.

Dave



 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org