You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Khawaja-Shahzad Butt <ks...@gmail.com> on 2008/11/30 02:15:50 UTC

Struts file upload issue

Hi,

I am having an issue with struts file upload during validation. On the page
when there's
a  validation error, the browsed/attached file drops. Does anyone
know a work around it, to have the previously attached file in tact, meaning
if i have attached a file and hit submit and got the validation error, the
file should still be
there, so that i don't have reattach it again.

Storing the file in session is out of league as it's not a good approach.

Please reply.

Thanks

Re: Struts file upload issue

Posted by Dave Newton <ne...@yahoo.com>.
--- On Sun, 11/30/08, Shazad wrote:
> Did you get a chance to look at the file dropping on the validaton issue.

Nope.

Dave


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


Re: Struts file upload issue

Posted by Shazad <ks...@gmail.com>.
Hi Dave,

Did you get a chance to look at the file dropping on the validaton issue.

Please reply.

Thanks

On Sat, Nov 29, 2008 at 8:19 PM, Dave Newton <ne...@yahoo.com> wrote:

> Yeah, I think you'd have to tweak something to create that change.
>
> If I have time tomorrow I'll take a quick look as well.
>
> Dave
>
> --- On Sat, 11/29/08, Khawaja-Shahzad Butt <ks...@gmail.com> wrote:
> > But i don't see any option in the file interceptor  to
> > store the file
> > temporarily. This issue behaves the same way in IE and
> > FF(Firefox).
> >
> > It would be great to have the file attached while
> > there's a validation error
> > so that the user doesn't have to reattach it. I am sure
> > some of the gurus
> > out there might have a work around it.
> >
> > Please reply.
> >
> > Thanks again.
> >
> > Shazad
> >
> > On Sat, Nov 29, 2008 at 7:27 PM, Dave Newton  wrote:
> >
> > > AFAIK it's a browser issue; it won't keep the
> > file name in the file select
> > > box. I haven't looked, but it might be possible to
> > save the file anyway,
> > > though, via interceptor ordering or an interceptor
> > modification--not sure.
> > >
> > > Dave
> > >
> > >
> > > --- On Sat, 11/29/08, Khawaja-Shahzad Butt
> > <ks...@gmail.com> wrote:
> > >
> > > > From: Khawaja-Shahzad Butt
> > <ks...@gmail.com>
> > > > Subject: Struts file upload issue
> > > > To: user@struts.apache.org
> > > > Date: Saturday, November 29, 2008, 8:15 PM
> > > > Hi,
> > > >
> > > > I am having an issue with struts file upload
> > during
> > > > validation. On the page
> > > > when there's
> > > > a  validation error, the browsed/attached file
> > drops. Does
> > > > anyone
> > > > know a work around it, to have the previously
> > attached file
> > > > in tact, meaning
> > > > if i have attached a file and hit submit and got
> > the
> > > > validation error, the
> > > > file should still be
> > > > there, so that i don't have reattach it
> > again.
> > > >
> > > > Storing the file in session is out of league as
> > it's
> > > > not a good approach.
> > > >
> > > > Please reply.
> > > >
> > > > Thanks
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Struts file upload issue

Posted by Dave Newton <ne...@yahoo.com>.
Yeah, I think you'd have to tweak something to create that change.

If I have time tomorrow I'll take a quick look as well.

Dave

--- On Sat, 11/29/08, Khawaja-Shahzad Butt <ks...@gmail.com> wrote:
> But i don't see any option in the file interceptor  to
> store the file
> temporarily. This issue behaves the same way in IE and
> FF(Firefox).
> 
> It would be great to have the file attached while
> there's a validation error
> so that the user doesn't have to reattach it. I am sure
> some of the gurus
> out there might have a work around it.
> 
> Please reply.
> 
> Thanks again.
> 
> Shazad
> 
> On Sat, Nov 29, 2008 at 7:27 PM, Dave Newton  wrote:
> 
> > AFAIK it's a browser issue; it won't keep the
> file name in the file select
> > box. I haven't looked, but it might be possible to
> save the file anyway,
> > though, via interceptor ordering or an interceptor
> modification--not sure.
> >
> > Dave
> >
> >
> > --- On Sat, 11/29/08, Khawaja-Shahzad Butt
> <ks...@gmail.com> wrote:
> >
> > > From: Khawaja-Shahzad Butt
> <ks...@gmail.com>
> > > Subject: Struts file upload issue
> > > To: user@struts.apache.org
> > > Date: Saturday, November 29, 2008, 8:15 PM
> > > Hi,
> > >
> > > I am having an issue with struts file upload
> during
> > > validation. On the page
> > > when there's
> > > a  validation error, the browsed/attached file
> drops. Does
> > > anyone
> > > know a work around it, to have the previously
> attached file
> > > in tact, meaning
> > > if i have attached a file and hit submit and got
> the
> > > validation error, the
> > > file should still be
> > > there, so that i don't have reattach it
> again.
> > >
> > > Storing the file in session is out of league as
> it's
> > > not a good approach.
> > >
> > > Please reply.
> > >
> > > Thanks
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >

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


Re: Struts file upload issue

Posted by Khawaja-Shahzad Butt <ks...@gmail.com>.
Thanks for the reply.

But i don't see any option in the file interceptor  to store the file
temporarily. This issue behaves the same way in IE and FF(Firefox).

It would be great to have the file attached while there's a validation error
so that the user doesn't have to reattach it. I am sure some of the gurus
out there might have a work around it.

Please reply.

Thanks again.

Shazad

On Sat, Nov 29, 2008 at 7:27 PM, Dave Newton  wrote:

> AFAIK it's a browser issue; it won't keep the file name in the file select
> box. I haven't looked, but it might be possible to save the file anyway,
> though, via interceptor ordering or an interceptor modification--not sure.
>
> Dave
>
>
> --- On Sat, 11/29/08, Khawaja-Shahzad Butt <ks...@gmail.com> wrote:
>
> > From: Khawaja-Shahzad Butt <ks...@gmail.com>
> > Subject: Struts file upload issue
> > To: user@struts.apache.org
> > Date: Saturday, November 29, 2008, 8:15 PM
> > Hi,
> >
> > I am having an issue with struts file upload during
> > validation. On the page
> > when there's
> > a  validation error, the browsed/attached file drops. Does
> > anyone
> > know a work around it, to have the previously attached file
> > in tact, meaning
> > if i have attached a file and hit submit and got the
> > validation error, the
> > file should still be
> > there, so that i don't have reattach it again.
> >
> > Storing the file in session is out of league as it's
> > not a good approach.
> >
> > Please reply.
> >
> > Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Struts file upload issue

Posted by Dave Newton <ne...@yahoo.com>.
AFAIK it's a browser issue; it won't keep the file name in the file select box. I haven't looked, but it might be possible to save the file anyway, though, via interceptor ordering or an interceptor modification--not sure.

Dave


--- On Sat, 11/29/08, Khawaja-Shahzad Butt <ks...@gmail.com> wrote:

> From: Khawaja-Shahzad Butt <ks...@gmail.com>
> Subject: Struts file upload issue
> To: user@struts.apache.org
> Date: Saturday, November 29, 2008, 8:15 PM
> Hi,
> 
> I am having an issue with struts file upload during
> validation. On the page
> when there's
> a  validation error, the browsed/attached file drops. Does
> anyone
> know a work around it, to have the previously attached file
> in tact, meaning
> if i have attached a file and hit submit and got the
> validation error, the
> file should still be
> there, so that i don't have reattach it again.
> 
> Storing the file in session is out of league as it's
> not a good approach.
> 
> Please reply.
> 
> Thanks

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