Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RESTful Service: Expose BLOB file inside DB as RESTful service ??

fatehcis-JavaNetNov 19 2012 — edited Nov 20 2012
Hello,

With Oracle Cloud we can expose the Data as RESTful Web Service, but how about exposing BLOB... we need to generate a link for that file which is stored in the DB.

To make it clearer:

Two Tables:
Properties (Property_ID number PK, Project varchar2(40), Property_number varchar2(20) ...)
Images  (ID number PK, Property_ID number FK, content blob, 
mimetype varchar2(200), filename varchar2 (200), filesize varchar2 (200))
And I would like to expose this query as RESTful :
Select p.property_id, p.project, p.property_number, i.content 
from properties p inner join images i on (p.property_id = i.property_id)
Usually we use: [url http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm#CHDICGDA] apex_util.get_blob_file_src , but that one should be called from a valid apex session !!!!! ( in that query "i.content" should give a link.)

How can we do it ???

Another point, since we expose the data as JSON:
Suppose I have a property with 10 images, then it does not make sense to get 10 rows fro the same property just to give different image. I think we need another level (nested level) for images !!!

I hope that my point is clear,

Thanks in advance ....
Fateh
This post has been answered by RickG on Nov 19 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2012
Added on Nov 19 2012
2 comments
953 views