Skip to Main Content

APEX

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!

Apex + Restful Service + Insert-upload image in table.

Juan JesusApr 21 2017 — edited Apr 24 2017

Hello all,

I'm new to apex and restful but I've been able to follow and complete some basic examples.

I would thank anyone to help me with the following:

REST Data Services Developers Guide

In the previous link the doc. tells how to use apex to create a restful service to insert a record in the following table:

CREATE SEQUENCE GALLERY_SEQ

/

CREATE TABLE GALLERY (

  ID NUMBER NOT NULL ENABLE,

  TITLE VARCHAR2(1000) NOT NULL ENABLE,

  CONTENT_TYPE VARCHAR2(1000) NOT NULL ENABLE,

  IMAGE BLOB NOT NULL ENABLE,

  CONSTRAINT GALLERY_PK PRIMARY KEY (ID) ENABLE

)

/

this is the source field to create the restful service.

declare

image_id integer;

begin

insert into gallery (title,content_type,image)

  values (:title,:content_type,:body)

  returning id into image_id;

:status := 201;

:location := image_id;

end;

The problem I found is that I have no idea how to call the rest service given there are normal parameters and a parameter of  file type to upload.

I would like to know how to call this from httpclient - firefox or similar.

Many thanks.

Juanje

This post has been answered by InoL on Apr 24 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2017
Added on Apr 21 2017
8 comments
1,178 views