You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Martin Cooper <ma...@apache.org> on 2002/12/25 05:05:43 UTC

Re: [FileUpload] Different FileItem implementation

Fixed. Sorry for the long delay.

--
Martin Cooper


On Thu, 28 Nov 2002, Susana Pereira wrote:

>
>
> >On Thu, 21 Nov 2002, Susana Pereira wrote:
>
> > > Hi, I'm using FileUpload project and i've found some difficulties with
> >FileItem implementation.
>
> >What kind of difficulties have you had? Could they be solved with a
> >generally useful change to the FileUpload component?
>
> I resolved that by extending DefaultFileItem and implementing all the
> methods that i need on my own object. I believe that this is not the best
> way of doing it, but that was the only way...
>
>
>
> >
> > > I would like to use my own implementation of FileItem processing a
> >different disk storage. But, in FileUpload you're using a Class Cast to
> >DefaultFileItem:
> > >     OutputStream os = ((DefaultFileItem) item).getOutputStream();.
> >
> >That's a bug. The intent was that you be able to specify your own
> >implementation. I will fix this.
>
> I'll be waiting...
> Thanks.
> Susana.
>
> >
> > >
> > > So I've tried to extend DefaultFileItem, but I cannot access class
> >private fields such as 'storeLocation' and/or 'byteStream'.
> > > My questions are: Do I have to extend DefaultFileItem? (what's the
> >interest
> > > of an Interface if I can't use a different implementation?)
> > > Why isn't getOutputStream() a FileItem method?
> >
> >Good question! I predict that will be the fix... ;-)
> >
> >--
> >Martin Cooper
> >
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>