You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Albrecht Leiprecht <al...@t-online.de> on 2004/12/17 18:53:23 UTC

Re: How to upload Images

Not too long ago I wrote the following email and got a couple of interesting
answers trying to help me with the solution. Thank you all for it. Now, I
found out that there is something REALLY weird going on.
> Hi all,
> I understand that
>
>    FileItem fileItem = data.getParameters().getFileItem("file");
>    fileItem.write(TurbineServlet.getRealPath("") +"/images/" +
>    data.getUser().getUserName() + ".jpg");
>
> is supposed to be used for uploading content through forms in Turbine
> actions It seems to work, with one little problem.... The image I am
> getting on the server is totally scrambled. Doesnt look like the original
> at all.

The point is, that if i use the above code with larger images (300x300) it
seems to work just fine. It doesnt work with images smaller than that for
some reason ... funny ...


One more thing ... i don't need a solution anymore, since i used a different
way of uploading the images.

rgds
Albrecht F. Leiprecht


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


Re: How to upload Images

Posted by Albrecht Leiprecht <al...@t-online.de>.
> If there is another way of doing it please share.

I used PHP ;-)
I was to lazy to follow it through all the way, but I am trying to write it
in Java as soon as I can.

rgds
albi

>
> ----- Original Message -----
> From: "Albrecht Leiprecht" <al...@t-online.de>
> To: "Turbine Users List" <tu...@jakarta.apache.org>; "Albrecht
> Leiprecht" <al...@t-online.de>
> Sent: Friday, December 17, 2004 11:53 AM
> Subject: Re: How to upload Images
>
>
> > Not too long ago I wrote the following email and got a couple of
> > interesting
> > answers trying to help me with the solution. Thank you all for it. Now,
I
> > found out that there is something REALLY weird going on.
> >> Hi all,
> >> I understand that
> >>
> >>    FileItem fileItem = data.getParameters().getFileItem("file");
> >>    fileItem.write(TurbineServlet.getRealPath("") +"/images/" +
> >>    data.getUser().getUserName() + ".jpg");
> >>
> >> is supposed to be used for uploading content through forms in Turbine
> >> actions It seems to work, with one little problem.... The image I am
> >> getting on the server is totally scrambled. Doesnt look like the
original
> >> at all.
> >
> > The point is, that if i use the above code with larger images (300x300)
it
> > seems to work just fine. It doesnt work with images smaller than that
for
> > some reason ... funny ...
> >
> >
> > One more thing ... i don't need a solution anymore, since i used a
> > different
> > way of uploading the images.
> >
> > rgds
> > Albrecht F. Leiprecht
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


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


Re: How to upload Images

Posted by Tony Oslund <ao...@bevcomm.net>.
If there is another way of doing it please share.

----- Original Message ----- 
From: "Albrecht Leiprecht" <al...@t-online.de>
To: "Turbine Users List" <tu...@jakarta.apache.org>; "Albrecht 
Leiprecht" <al...@t-online.de>
Sent: Friday, December 17, 2004 11:53 AM
Subject: Re: How to upload Images


> Not too long ago I wrote the following email and got a couple of 
> interesting
> answers trying to help me with the solution. Thank you all for it. Now, I
> found out that there is something REALLY weird going on.
>> Hi all,
>> I understand that
>>
>>    FileItem fileItem = data.getParameters().getFileItem("file");
>>    fileItem.write(TurbineServlet.getRealPath("") +"/images/" +
>>    data.getUser().getUserName() + ".jpg");
>>
>> is supposed to be used for uploading content through forms in Turbine
>> actions It seems to work, with one little problem.... The image I am
>> getting on the server is totally scrambled. Doesnt look like the original
>> at all.
>
> The point is, that if i use the above code with larger images (300x300) it
> seems to work just fine. It doesnt work with images smaller than that for
> some reason ... funny ...
>
>
> One more thing ... i don't need a solution anymore, since i used a 
> different
> way of uploading the images.
>
> rgds
> Albrecht F. Leiprecht
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 



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