You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by abhi <pa...@yahoo.com> on 2011/03/11 01:01:50 UTC

DnD and post image to server

I'm exploring the DnD feature of Pivot. Its working like a charm. Users want
to drop images and then upload it instead of file-->browse option. I'm able
to get the images dropped fine but not sure how to post the image to server
side that would save it to DB. Not sure how to get the ByteArray out of
ImageView to post it server side code. Can someone please help? Let me know
if there are alternatives.

Thanks in Advance!

Abhi



--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/DnD-and-post-image-to-server-tp2662942p2662942.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: DnD and post image to server

Posted by abhi <pa...@yahoo.com>.
awesome!! Took a while to know that I could safely type cast
org.apache.pivot.wtk.media.Image to Picture and get the bufferedImge out of
it. Now that we have BufferedImage saving it can be either via HTTP post
query or something else. Thanks for your help. Game on...

--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/DnD-and-post-image-to-server-tp2662942p2666283.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: DnD and post image to server

Posted by Greg Brown <gk...@verizon.net>.
I don't think there's a specific example that demonstrates this, but try using a PostQuery with a BufferedImageSerializer. You can get the BufferedImage from the image in the ImageView (as long as it is an instance of Picture).


On Mar 10, 2011, at 7:01 PM, abhi wrote:

> I'm exploring the DnD feature of Pivot. Its working like a charm. Users want
> to drop images and then upload it instead of file-->browse option. I'm able
> to get the images dropped fine but not sure how to post the image to server
> side that would save it to DB. Not sure how to get the ByteArray out of
> ImageView to post it server side code. Can someone please help? Let me know
> if there are alternatives.
> 
> Thanks in Advance!
> 
> Abhi
> 
> 
> 
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/DnD-and-post-image-to-server-tp2662942p2662942.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.