Re: how to pass an object
Re: how to pass an object
- Subject: Re: how to pass an object
- From: Robert Walker <email@hidden>
- Date: Thu, 8 Jan 2004 01:41:25 -0500
Kranthi,
I assume your image in contained in an NSData object after you get it
from the database. If this is correct then you would use a WOImage
element in the component and bind the image data to the "data" binding
and bind a string "image/jpeg" or "image/gif" to the "mimeType"
binding.
That's all!
P.S. It sounds like you may be calling some sort of SQL statement
directly (based on your description below). If that's the case I'm
wondering why you are doing that, instead of letting EOF handle all the
SQL stuff for you.
Getting the image data the EOF way would look something more like this:
Picture myPicture; //assume this exists
NSData theImageData = myPicture.imageData();
or the key value coding way like:
EOEnterpriseObject myPicture; //assume this exists
NSData theImageData = (NSData)myPicture.valueForKey("imageData");
On Jan 8, 2004, at 12:24 AM, Kranthi Sagar Borra wrote:
Hi,
I have and image file stored in the database as a BLOB object.Now when
I fire a query on the database as
Select <object> from <tablename>
I get the object.But now my question is , how do I pass this object
to the front(browser) so that the user is able to view the picture.
Thanks in advance.
Regards,
Kranthi Sagar
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Sincerely,
Robert Walker
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.